Scheduling Work for Agents
An agent can promise to do something later, like "every weekday at 9am, summarize my open pull requests", and keep that promise with a dynamic schedule. eve has this built in. With other harnesses, you write two pieces, a tool and a consumer:
- A tool creates the schedule. The model calls it with a time and a prompt. The tool calls
Schedules.create()with a Edgenivo Queue topic as the target, the user's ID as the namespace, and the prompt in the payload. - The schedule fires. Edgenivo publishes a message to the topic with the payload.
- A consumer wakes the agent. It sends the prompt back to the agent, as if the user had just asked. With a durable harness, it can send the prompt into the same conversation.
| Harness | How it schedules work |
|---|---|
| eve | Built in. defineDynamicSchedules gives the agent tools to create and manage schedules. |
| libfx | A tool you write. The consumer prompts the session that created the schedule. |
| AI SDK | A tool you write. The consumer runs the prompt as a new agent turn. |
| Pi | A tool you write, on durable-harness. The consumer sends the prompt into the same session. |
- Use a namespace per user. The tool decides the namespace, not the model, so a user can only list and cancel their own schedules. See Multi-tenant schedules.
- Name schedules after the tool call. If a harness retries a tool call, the same name returns
schedule_already_existsinstead of creating a second schedule. - Write a standalone prompt. Tell the model to write the scheduled prompt as a complete instruction, and give it the user's current time and time zone so it can resolve "tomorrow at 9".
- Return errors to the model. Return a
SchedulesApiError's message from the tool, such as an invalid cron expression, so the model can fix the call. - Expect retries. Queue messages can be delivered more than once. Use the message's
executionIdto deduplicate. See Handling scheduled runs.
Last updated November 4, 2026
Was this helpful?