Agent schema reference
Complete agent examples, typed inputs and outputs, and field reference.
An agent file has 4 top-level blocks: ellipsis, optional trigger, optional input, and session. Set ellipsis.kind to agent. Unknown fields fail validation. See Agents for how files deploy and run.
Scheduled test checks
Every night at 02:00 UTC, a session runs the tests and reports failures without changing code.
React to a pull request
Each push to a non-draft pull request in api-repo that changes src/routes/ starts a session. The trigger decides which events match; the environment decides which repositories are checked out.
Typed input and output
Start it with {"input":{"description":"Reject expired reset tokens"}} instead of a prompt. The validated result is output.result on the session once the message is answered.
Structured output works with the models that list it in GET /v1/account/models.
An agent with a trigger can declare input too. Each {{field}} in the prompt is filled from the event when the trigger fires and from the input when you start the agent, so a field must exist in both. A prompt with no {{field}} gets the event's details on a trigger and the input as JSON on a start.
When a Linear issue opens, the prompt starts with Triage API-214. from the event. Starting the agent with {"input":{"issue":{"identifier":"API-214"}}} fills the same prompt from the input.
Add a Codex skill
A skill is a directory with a SKILL.md file that gives Codex a reusable procedure and its supporting files:
SKILL.md needs YAML frontmatter with a description. Ellipsis reads the skill from the session's checkout of that repository, or from its default branch when the repository isn't in the session. A missing or invalid skill fails the session.
A session can have up to 10 skills. Each skill can have up to 50 files, 64 KiB per file, and 512 KiB in total.
Add an MCP server
List MCP servers under session.mcp. Claude Code and Codex sessions both get their tools.
Sessions of test-repair get the tools of the internal-tools server.
- A server with
urlis a remote server that speaks streamable HTTP. Replace the example URL with your server's. - A server with
commandruns inside the session's environment, with optionalargsandenv. List it on the environment that installs it. - A session also gets the servers its environment lists, and a server listed here under the same name replaces the environment's.
${NAME}inheadersorenvreads the secretNAMEwhen the session starts. It doesn't need avariablesentry. A missing secret fails the session.- To add the tools of a connected Slack or Linear integration, list it by name, as
- slackor- linear. Listing an integration that isn't connected fails the session at start. - A repository's own
.mcp.jsonis ignored. - With Codex, a server that fails to start fails the message.
Budgets
Values are US dollars. session caps each session. day, week, and month cap this agent's total spend over the last 1, 7, and 28 days. The Slack, GitHub, Linear, and Sentry agents take the same fields. Account limits also apply. See Budgets.
Fields
prompt in any config file takes text, path: <file>, or a list of text and files joined in order with a blank line between each. A file is in the repository that holds the config or, with repository, in another one. Ellipsis reads it when the config syncs and again when the file changes. The API takes text only.
Identifies the file.
One cron or react trigger; omit to start only on demand. See Triggers.
Typed input for sessions you start from the dashboard, CLI, or API; a trigger fires without it. See Typed input and output.
The session each run starts.
Prompt fields
Each {{field}} in an agent's prompt is replaced with that field's value, from the input or from the trigger's event. An unknown field fails validation. A prompt with no {{field}} gets the input as JSON or the event's details after it.
Each trigger sets these fields.
Fields of the check_run trigger.
Fields of the check_suite trigger.
Fields of the issue trigger.
Fields of the linear_issue trigger.
Fields of the pull_request trigger.
Fields of the push trigger.
Fields of the release trigger.
Fields of the sentry trigger.
Fields of the slack_channel trigger.
Fields of the status trigger.
Fields of the workflow_run trigger.
See Models, the Environment schema reference, and Permissions.