TextQL Agents let you automate your analytics queries and reporting. You can create an Agent to run automatically at set intervals, on specific schedules, or whenever a webhook event fires.

“Send a usage report to Slack every day at 10:45am”

Typical use cases for Agents include:

  • “Were there any large changes in sales numbers yesterday?”
  • “Send me a daily report on product usage from the past 24 hours.”
  • “Run our forecasting model every time the S&P drops 1% in an hour. Notify me of the event, and send back a report explaining our exposure.”

Features

Triggers

Triggers define when an Agent runs. There are two main types of triggers: Scheduled Triggers and Webhook Triggers.

Scheduled Triggers

Scheduled runs allow agents to be triggered based on time-of-day or based on events-triggers. The agent setup pane supports Interval triggers, Time and Day triggers and Custom triggers (via a CRON UTC formula).

Interval

Run every X minutes after activation. For example, “Run this Agent every 60 minutes.

Time and Day

Run on a fixed schedule, such as every weekday at 9:00 AM or every Monday at 3:00 PM.

Custom

Run on a custom or irregular schedule.

Webhook Triggers

Webhook triggers cause an Agent to run automatically whenever an external event is sent to a unique webhook URL. You can integrate this with external systems—like payment processors, CRMs, or monitoring tools—so that when a specific event occurs (e.g., “new transaction created,” “error event logged,” etc.), the Agent is triggered.

Setting-up Webhook Triggers

Typical uses for Webhook Triggers include:

  • Running a forecast or analysis when a threshold is exceeded in another system.
  • Generating a quick summary of data whenever a user clicks a button in your custom UI.

Integrations

By default, agent runs are treated as new chats with the user who activated the agent. This means results and summaries from agents runs are accessible through

  • The chat history page, or
  • the TextQL insights page (if TextQL insights are generated from the the agent run. See Insights Documentation for further details).

Agents tend to work best when the results are pushed to you. At present, agents have a Slack integration that allows gents to push results to your Slack channels. (Note: Presently, TextQL Agents may only send results to public channels within your organization. See Slack Integration Documentation for further details).

Setting-up Agents with Slack Integration

Response Formats

Agents can deliver results in different formats to match your workflow:

  • Insights Mode will ask the agent to selectively alert you in instances where a TextQL Insight has been uncovered (See Insights Documentation for further details). Best for tasks like insights mining, or questions like “Notify me of statistically significant changes in X.”
  • Chat Report Mode will alert you after every agent run with the result of your analysis or requested deliverable. Best for tasks like daily reports or automated datachecks.

Your First Agent

To create an agent, navigate to the Agents tab and then click +New. This will open a setup pane similar to the one below:

Agent Setup Pane

Add the following information to complete your agent:

  1. Name and Description – Provide a descriptive name (e.g., “Daily Usage Report”) and optional details about what the Agent does.
  2. Instructions – This content will become the agents main set of instructions. For this reason, it is generally preferable to include a long an thorough prompt, that accounts for different situations the agent may run into as it runs this analysis on a schedule.
  3. Attached Datasets – If you have specific data sources, queries, or dashboards you want the Agent to reference, attach them here. Note: agents have the ability to search your companies data-warehouse for the datasource of interest. Unless your agent is designed for a specific datasource, and configured to run on a schedule, attaching a dataset to the agent directly will have a minimal effect on the agents performance.
  4. Triggers – Choose between Scheduled or Webhook triggers (or both).
  5. Alert in Slack – Select which Slack channel(s) you’d like the Agent to post results to.
  6. Send Insights / Send Chat Report – Toggle how you want the results to appear.

Once you have completed the form in create agents, click preview in new chat to watch a sample agent attempt to address your task in real time in front of you.
If all looks good, and no changes are needed, you can safely log out and future run results will be sent to you in Slack.