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

1
ellipsis:
2
kind: agent
3
name: nightly-tests
4
description: Check the API test suite every night
5
6
trigger:
7
type: cron
8
schedule: '0 2 * * *'
9
10
session:
11
claude_code:
12
prompt: |
13
Run the tests in api-repo. Report failures with the test
14
name and error. Do not modify code.
15
model: claude-opus-5-5
16
environment:
17
repositories:
18
- name: api-repo
19
permissions:
20
github: read_only
21
budget:
22
session: 3
23
day: 10
24
week: 50

Every night at 02:00 UTC, a session runs the tests and reports failures without changing code.

React to a pull request

1
ellipsis:
2
kind: agent
3
name: check-api-changes
4
5
trigger:
6
type: react
7
pull_request:
8
on: [pushed]
9
repositories: [api-repo]
10
paths: ['src/routes/**']
11
draft: false
12
13
session:
14
claude_code:
15
model: claude-opus-5-5
16
prompt: |
17
Check the changed API routes for missing test coverage.
18
Add focused regression tests where needed, run them,
19
and report the results.
20
environment:
21
repositories:
22
- name: api-repo
23
budget:
24
session: 5

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

1
ellipsis:
2
kind: agent
3
name: classify-change
4
5
input:
6
json_schema:
7
type: object
8
properties:
9
description:
10
type: string
11
required: [description]
12
additionalProperties: false
13
14
session:
15
claude_code:
16
prompt: |
17
Classify the requested change as bugfix, feature, or maintenance.
18
Explain the classification in one sentence.
19
20
The change is {{description}}
21
model: claude-opus-5-5
22
output:
23
json_schema:
24
type: object
25
properties:
26
category:
27
type: string
28
enum: [bugfix, feature, maintenance]
29
reason:
30
type: string
31
required: [category, reason]
32
additionalProperties: false
33
budget:
34
session: 1

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.

1
ellipsis:
2
kind: agent
3
name: issue-triage
4
5
trigger:
6
type: react
7
linear_issue:
8
on: [opened]
9
10
input:
11
json_schema:
12
type: object
13
properties:
14
issue:
15
type: object
16
properties:
17
identifier:
18
type: string
19
required: [identifier]
20
required: [issue]
21
additionalProperties: false
22
23
session:
24
claude_code:
25
prompt: |
26
Triage {{issue.identifier}}. Reproduce the issue, label it, and
27
comment with a proposed fix.
28
model: claude-opus-5-5

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:

1
session:
2
codex:
3
prompt: Use the release-checks skill to review the release.
4
model: gpt-6.1-sol
5
skills:
6
- path: skills/release-checks
7
repository:
8
name: api-repo

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.

1
ellipsis:
2
kind: agent
3
name: test-repair
4
5
session:
6
claude_code:
7
model: claude-opus-5-5
8
environment: api-environment
9
mcp:
10
- name: internal-tools
11
url: https://tools.example.com/mcp
12
headers:
13
Authorization: Bearer ${TOOLS_TOKEN}

Sessions of test-repair get the tools of the internal-tools server.

  • A server with url is a remote server that speaks streamable HTTP. Replace the example URL with your server's.
  • A server with command runs inside the session's environment, with optional args and env. 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} in headers or env reads the secret NAME when the session starts. It doesn't need a variables entry. A missing secret fails the session.
  • To add the tools of a connected Slack or Linear integration, list it by name, as - slack or - linear. Listing an integration that isn't connected fails the session at start.
  • A repository's own .mcp.json is ignored.
  • With Codex, a server that fails to start fails the message.

Budgets

1
session:
2
claude_code:
3
model: claude-opus-5-5
4
budget:
5
session: 5
6
day: 20
7
week: 100
8
month: 300

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.

On this page

Schedule a demo
For HumansFor Agents