Ask AI

Scheduled Jobs & Agents

You can schedule work with Sapience!

How Scheduled Jobs Work

💡

Sapience essentially provides an entire operating system harness around the Agents that you create. One part of that system is the Sapience Task Scheduler. This lets you create/run certain jobs periodically. For example, you can get a weekly project summary emailed to you. You can have Sapience perform certain web research every day (e.g. news on a topic you care about). Learn more below!

Key Things To Know:

  1. Some Agents have access to Scheduled Jobs, and can both retrieve all of the scheduled jobs in the system for your user, and also create new ones.
  1. Scheduled Jobs are powerful tools, and essentially runs a “cron job” in the background.
  1. The list of jobs that can be scheduled is always growing, but currently includes:
    1. Scheduled Web Research: Use the Web Research Agent to research topix X and send me an email with results;
    2. Scheduled Project Digest: Send me an email digest report for Project X, on a schedule, showing me all tasks and status and which are overdue;
    3. Scheduled Project Agent work: you can get the Project Agent to fire up on a schedule and do a variety of things for you, including send you a project summary, suggest next steps and more.

Each of these is covered in more detail below.

Lets go a bit deeper and see this in action. Here’s an example of an email send from the Scheduled Jobs system:

Screenshot shows an email that was sent by the Sapience Agent, in response to the user having created a daily task to send them news on a certain topic, in this case AI trends.  The flow was: 1) user created daily scheduled job with Sapience Agent; 2) at the scheduled time, the Agent woke up, used the Web Research Agent to do web research, and then sent the user an email.
Screenshot shows an email that was sent by the Sapience Agent, in response to the user having created a daily task to send them news on a certain topic, in this case AI trends. The flow was: 1) user created daily scheduled job with Sapience Agent; 2) at the scheduled time, the Agent woke up, used the Web Research Agent to do web research, and then sent the user an email.

Creating & Managing Scheduled Jobs via Sapience Agent:

  • You can ask the Sapience Agent any variation of “What scheduled jobs do I have?”, or “What scheduled tasks do I have?”
  • Initially, you will get a response similar to this:
Notion image
  • You can ask the Agent what sorts of jobs it can schedule for you, and set up those scheduled jobs right from the chat.
  • This is a series of “tools” for the Sapience Agent, that together form the Scheduled Work Feature.
  • When you tell the agent to create a scheduled job, make sure you specify your timezone (it will automatically convert that to UTC)
  • When it creates a new scheduled job for you, you will get a message similar to this:
Screenshot showing the Sapience Agent, setting up a scheduled job to email the user a project summary/digest email each day.
Screenshot showing the Sapience Agent, setting up a scheduled job to email the user a project summary/digest email each day.
 

Managing Scheduled Jobs Via the GUI

  • Alternatively, if you don’t want to manage scheduled jobs through the Agent, or want very explicit control, then you can do it through the GUI.
  • Lets go through it:
    • First, Open Menu > Settings & Customization > Advanced > Scheduled Jobs
    • There you will see a screen showing you any and all Scheduled Jobs that you have already created (this might be empty for you):
    • This is how it looks once you have some jobs scheduled. From here you can click to edit a Job, or delete it.
Scheduled Jobs management via the GUI rather than through the Sapience Agent.  Here you can see we have a daily Agent job running, plus a daily Project summary email being sent.
Scheduled Jobs management via the GUI rather than through the Sapience Agent. Here you can see we have a daily Agent job running, plus a daily Project summary email being sent.
 

Creating a new Scheduled Job via the GUI

If you want to explicitly control the job you create, then open up the Scheduled Jobs interface via Menu > Settings & Customization > Advanced > Scheduled Jobs. On that window, click “Add Scheduled Job” and you will see a form like this:

This is the screen for creating a scheduled job.  This is available in Menu > Settings & Customization > Advanced > Scheduled Jobs.
This is the screen for creating a scheduled job. This is available in Menu > Settings & Customization > Advanced > Scheduled Jobs.

Types of Scheduled Jobs

Here - you will first select from the Job Type. Currently there are two job types supported but this will grow a great deal over the next few months. These are the two requested items we get and they’re powerful:

  1. Project Digest: this will email you on a schedule, with a report on whichever Project you select.
  1. Scheduled Agent Run: this is incredibly powerful. It lets you schedule Sapience to do work for you whenever you select. This will kick-off at the scheduled time, and do the work you’ve asked it to. See below for some ideas.
  1. Project Agent Job: this is different to a Scheduled Job for a regular Agent, as Project Agents are special 🙂 Project Agents are Sapience’s superpower though, so hopefully if you’re reading this advanced article, you’re all over that. Here you can schedule the Project Agent to do work for you, which is probably the most powerful application of the Scheduled Job system.

Scheduled Agent Run

When you create a scheduled Agent run, you do the obvious bits, like select the time you want it to run. Then, you select the Agent you want to use, and you give it the JOB you want it to perform. In the screenshot below, you can see I have scheduled the Sapience Agent (one of the global built-in Agents) to perform web research (for which it will use the Web Research Agent behind-the-scenes) and then to email me the results (using its Email Features/Tool).

The Sapience Agent is a great target for these automation uses cases as its got the largest array of tools available to it of all Agents in the system, including the ability to call other Agents.

 
Notion image
  • This job is setup to run once a day, and do the research we outlined in the query box. Below you can see a screenshot of the email we got at the scheduled time, with the results of the Agents work.
Email from the Saipence Agent, after running via a Scheduled Job with the query from above.  Note that you can schedule ANY work that an Agent is capable of doing.  In this case we are using two of the built-in Features of the Sapience Agent, being able to call the Web Research Agent and being able to send emails.  But we could program it to do any action that the Agent in question is capable of performing.
Email from the Saipence Agent, after running via a Scheduled Job with the query from above. Note that you can schedule ANY work that an Agent is capable of doing. In this case we are using two of the built-in Features of the Sapience Agent, being able to call the Web Research Agent and being able to send emails. But we could program it to do any action that the Agent in question is capable of performing.

Remeber - if you ask an Agent to do something it cannot do, then your Scheduled Job will not work! Best appraoch is to try asking the Agent in the main Chat interface to do the thing that you want to schedule. If it works, then you can schedule it. For example, the Web Research Agent cannot send emails. So to schedule Web Research and Email, we used the Sapience Agent in the example above.

Some Ideas To Get You Started:

  • News:
    • “Research topic ABC using your web research capabilities and then EMAIL ME the results of your research”
  • Project Agent:
    • “Summarize the status of the Project each week, and send me insights on the Project, including suggestions for what I should do next”.
    • “Send me a summary of all open items, and give me a three point action plan for each Task that is assigned to me, that is not marked as done.”
Did this answer your question?
😞
😐
🤩