Ren

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:

spaces/engineering/agents/planner/agent.yaml
description: Breaks a request into small tasks.
spaces/engineering/agents/planner/instructions.md
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

KeyWhat it sets
descriptionWhat the agent does. A subagent needs one.
isSubagenttrue makes it a subagent. The default is false.
settingsThe agent’s model, steps, permissions and repositories. See Organization → Settings.
renamedFromEarlier names. See Rename, move and remove.

This agent gets more steps, can never force-push, and reads the example app’s develop branch:

spaces/engineering/agents/implementer/agent.yaml
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:

spaces/engineering/agents/tester/agent.yaml
description: Runs the test suite on a pull request and reports failures.
isSubagent: true

Names

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:

spaces/mobile/space.yaml
name: Mobile
uses:
  agents:
    - reviewer
    - tester

The 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.