Tasks
Create proactive AI agents with tasks
What is a task?
Bot tasks allow you bots to complete predefined tasks either on a schedule or when triggered by an external event. This allows you to create pro-active AI agents that can do things like send you a personalised summary of AI news everyday.
How do tasks work?
Tasks work extremely simply and if you are already comfortable setting up and configuring your bots you will have no problems creating tasks.
Before creating your tasks, you setup your bot like normal creating a general system prompt, adding the data sources and power-ups that your bot might need to complete its tasks.
Once you bot is setup and working, you can then create tasks for it. At its simplest, a task is essentially an additional prompt that will be sent to the bot when your task runs.
Every time your bot tasks run (either scheduled or triggered) a new conversation is started with your bot, and the task prompt is sent as the message. This then triggers your bot to respond to the message, and in doing so it can uses its data sources, and call power-ups to complete the goals outlined in the task prompt.
By combining the task prompt with power-ups you can create powerful workflows using nothing but natural language!
Here's some top level ideas for things you could automate with tasks
- "Every Monday at 7am check these Slack channels (general, projects, and random), and send me a high level summary of any outstanding actions I might have"
- "Everyday check out Notion support ticket database for outstanding items and update their priority based on the age of each ticket"
- "Visit bbc.co.uk, techradar.com, wired.com and send me a personal newsletter containing the top stories on AI and business. Do this once a week."
Creating a task
Creating a task is simple, navigate the "Tasks" sections of your bot settings, and click the "New task" button.
You will then be taken to the task settings screen. Here there are a few fields for you to fill out:
- Task name - A name for your task. This is purely for your benefit so you can easily identify the task when it is run
- Task goal - The instructions for your task. This is the most important part of the task and its the prompt you want to give your bot when the task runs.
- Task schedule - How often do you want your task to run? Just say explain in plain english eg. "Once every Tuesday at 12pm"
Writing a good task goal
The task goal is the most important part of creating your task and can be as simple or as complicated as you like. For more complex tasks its important you write it clearly and often it will take a number of test runs before it works perfectly.
A good option can be to write a step by step process for you to follow. For complex tasks we would also recommend using a strong model such as GPT 4o of Claude Sonnet 3.5.
Below as an example of a real task we use at Chat Thing to generate us a daily support ticket summary and post the result to Slack.
Your goal is to generate a report on the current Chat Thing support tickets that are outstanding. Support item summary format: *<subject>* - <age> - <priority>\n <summary>\n <item link> Only use plain text, markdown is not supported. When outputting the link output the raw URL, don't format it in any special way. Steps: 1. Ask the support tickets bot to give you a list of all tickets that are either new or in progress, and to include a link to each notion ticket 2. Prioritise each ticket based on how old it is and the subscription level, we should prioritise paying customers and the oldest tickets. Assign each ticket a traffic light priority rating. Use the emojis 🚨 for red highest, ⚠️ for yellow , 🆗 and for green 3. Post a report into the "chatthing" channel with some general statistics about the number of items outstanding and then the summarised details of the outstanding tickets in the format outlined above. 4. Post a second message to the same channel with a suggestions on what the team should focus on and when. Post the result directly to Slack, don't respond here first
and here's the result of the task in Slack:
This task also requires multiple power-ups to be configured so it can post to Slack, get support tickets from Notion and look up customers in Stripe so hopefully you can see how powerful this can be.
Running a task manually
When developing tasks it can be really useful to test them by running them manually as you work on the task goal prompt. To do this, go to your bot's tasks section, find the task you want to run, open its settings menu and click "Run".
A window will appear showing you the task conversation as it runs. You can open the same window for previous task runs from the bot tasks page too, and because task runs are simply new conversations, you can view them in the conversations section too.