Workflows

Nothing in an agent runs on its own; every run starts with a request. A call to execAgent from your systems is how agents run without anyone typing.

Scheduled and event-driven runs

A scheduler or a webhook receiver that calls execAgent turns any agent into a scheduled job or an event handler: a morning digest, a handler for a new ticket, a check that runs every hour. Where the result should go, mail, chat or a ticket, is one more api command at the end of the agent. Run these as a service account, so the reports show what the schedule did.

Fan-out over a list

To run the triage agent for each of forty tickets, call execAgent once per ticket. Each call is an ordinary agent run, recorded and reported like any other.

Approval by another person

ask pauses a conversation for the user who started it. An approval by a different person takes two agents and a table. The requester's agent writes the request with db and ends. The approver's agent, opened from search or run by a scheduled call, reads what is pending, asks the approver with ask, and records the decision. The requester's next request, or a scheduled run, reads the decision.

Agents inside your applications

The bundled UI uses this same API, so an agent can run behind a button in your own application, in a chat integration, or in a pipeline step. With the search endpoint an application offers the same “type what you need” experience without the bundled UI. Runs started this way appear in the same reports as runs from the search box.