Working with scheduled tasks
The agent SDK includes the powerful Quartz scheduler and tools as part of the Common Tools to work with the scheduler. In addition, the base coordinator prompts also know how to handle parsing out a request for something that should be scheduled vs regular task execution.
The scheduler is also pre-configured to store triggers and jobs in your agent database, giving you maximum flexibility to run recurring tasks even across restarts of your agents.
Scheduled task prompts
Here are a few examples that an HR team might use to leverage your agent functionality on a recurring basis.
Every day/week/month send the workiversaries to #general
On the last day of every month, send me an email reminder to set up the new pulse engagement survey
Every six months send me a Slack reminder to update our employee handbook
If you're using the slack integration, the output might look something like the following:

Built-in tools for working with tasks
Because scheduling a new task is handled natively, there are no tools for doing that operation. Instead, we provide tools for listing your scheduled jobs and those in your organiation (if you have appropriate permissions) and clearing a job from the queue.
listMyScheduledTasksOrOrgsTasks
Lists the user's active or scheduled workflows (including tasks, jobs, etc). The user can also request to list all the organizations tasks but only if they have the proper permission (meaning they are an admin). You should only use the tool output - do not mention random or hallucinated tasks.
unscheduleOrRemoveOrDeleteTaskOrJob
Unschedule or remove or delete a previously scheduled task or job - including removing or deleting all of the users tasks or the organization's tasks. You must always explicitly confirm that the user wants to unschedule or remove the provided job id or all tasks if requested - never skip this. You should explicitly ONLY clear all the org tasks if the user specifically mentions clearing ALL the organizations tasks and has the proper permission. clearAllOrgTasks cannot be true if clearAllMyTasks is true. The Job id is always required and the user can only delete their own jobs unless they are an admin. The job id should explicitly never be modified from what the user sends to you."
Last updated
Was this helpful?