Agents
Each agent is a folder in agents/ of the space that owns it. The folder’s name is the agent’s name.
Declare an agent
Put the agent’s settings in agent.yaml and its instructions in instructions.md:
description: Breaks a request into small tasks.Split each request into tasks that one pull request can close.
Name the files each task changes.You need at least one of the two files. The agent’s instructions add to the organization’s and the space’s; see Instructions and memory.
Fields
| Key | What it sets |
|---|---|
description | What the agent does. A subagent needs one. |
isSubagent | true makes it a subagent. The default is false. |
settings | The agent’s model, steps, permissions and repositories. See Organization → Settings. |
renamedFrom | Earlier names. See Rename, move and remove. |
This agent gets more steps, can never force-push, and reads the example app’s develop branch:
description: Writes the code for one task and opens a pull request.
settings:
steps: 300
permissions:
- action: shell
resource: git push --force*
effect: deny
references:
- alias: example-app
repository: https://github.com/acme/example-app
branch: develop
description: The Acme web app, its API and its tests.A subagent is one that other agents call. They read its description to decide when, so it needs a clear one:
description: Runs the test suite on a pull request and reports failures.
isSubagent: trueNames
An agent’s name is a slug that’s unique in the organization, so two spaces can’t both own a reviewer. To use one agent in two spaces, share it.
Share an agent
To use an agent that another space owns, list it in uses.agents of your space’s space.yaml. Here Mobile uses Engineering’s reviewer and tester:
name: Mobile
uses:
agents:
- reviewer
- testerThe agent’s folder stays in the space that owns it. In each space that uses the agent, its settings and instructions combine with that space’s. To take the agent out of a space, remove its name from uses.agents.
A space’s automations, channels and factory can name any agent the space owns or uses, as long as it isn’t a subagent.