On a schedule
agent is optional: without it each run uses the workspace’s agent defaults. See Configure the agent.
Always set an explicit schedule and time zone. runMode chooses a new session per run, one reusable session, or an existing session. Scheduled tasks cannot carry a per-session MCP server, so their tools come from a workspace OpenAPI Integration or MCP connection, selected by id.
Manage tasks with listScheduledTasks, updateScheduledTask, pauseScheduledTask, resumeScheduledTask, triggerScheduledTask, and deleteScheduledTask.
From your product’s events
An inbound automation turns a signed HTTP event from your product into an agent session. Create a source (it has a public webhook endpoint and a signing secret) and a trigger (which events match and the session to start), withOpenGeniAutomationsClient from @opengeni/sdk/automations. Your product then posts JSON events:
Work until done
Give a background session a goal with success criteria, and it keeps working across turns until it completes the goal with evidence or pauses with a reason:Bring results back
- Write back through your tools. The agent calls your API to update a ticket, post a comment, or store a report, with the same authorization as any other call. This is the most direct path.
- Workspace webhooks. OpenGeni can notify your product when a turn completes or fails, when a session’s status changes, or when an agent waits for an approval or a question. Events are signed, delivered at least once, and may arrive out of order; treat each as a signal to read the session through the API. See Host-managed credentials & webhooks.
- Read the session.
listEventsandgetSessionreturn the full history and final answer at any time.