Concepts

Saved agents

Save a harness with its model, effort, instructions, skills and connections once, then start every run of it by sending its id as agent.

View .md

When you run the same kind of work again and again, the request should not repeat the setup each time. A saved agent keeps it: a harness with its model, effort, standing instructions, skills and connections. A run names it in agent, by its id, and sends only the task.

Saved agents live at /o/{org}/agents. They belong to the person who saved them, not to the org. An API key reaches its creator's saved agents.

04Every run starts from the same setup

SAVED AGENTCode reviewerharnessclaudemodelclaude-opus-5-5efforthighskills1connections1{ "agent": "…", "input": "Review PR 212" }POST /o/{org}/sessions{ "agent": "…", "input": "Review PR 213" }POST /o/{org}/sessions{ "agent": "…", "input": "Review PR 214" }POST /o/{org}/sessions
Scene. A saved agent fixes the harness, model, effort, instructions, skills and connections; each run sends its id as agent and adds its own input.
Video, 30 s, no sound. The setup every request repeated is saved once with POST /o/{org}/agents; each run then sends only the agent's id and the task, and an edit reaches every new run. Fields are the API's, values an example.

Save one

JSON
{
  "name": "Plugin reviewer",
  "harness": "claude",
  "model": "claude-opus-5-5",
  "effort": "high",
  "instructions": "Review each plugin.json and report every problem with its file and a fix.",
  "skills": [
    {
      "url": "https://github.com/anthropics/skills/tree/main/skills/frontend-design"
    }
  ],
  "connections": ["deepwiki"]
}
Field What it fixes
name, description How it is listed.
harness claude, codex or opencode. It cannot change after saving.
model, effort A model and effort level /agents/available lists for the harness. Without model, the harness's first model.
instructions Standing instructions every run receives, up to 16 KiB.
skills Up to 10 skills by URL, as on a run.
connections Ids or names of your own connections, as on a run. They read back as [{"id", "name"}].
capabilities browser and computer, when the agent should use them.

A model or effort the catalog does not list is 422 UNSUPPORTED_PROFILE, with per-field codes such as UNKNOWN_MODEL and INVALID_EFFORT. So are skills on an agent whose tool selection, made in the console, leaves out Skill (SKILL_TOOL_REQUIRED). A field the route does not take is 400 UNKNOWN_FIELD.

Skills are pinned

Skills are fetched and pinned when you save: a GitHub source to the commit its branch or tag points at, any other source to its content. Every run of the agent loads exactly that pin. If a pinned file changes upstream, runs are refused with 422 SKILL_INVALID until you save the agent again, which pins the new content.

Run one

Send the agent's id as agent, in place of a harness:

Shell
curl -X POST https://api.phoenix.so/o/$RUSH_ORG/sessions \
  -H "Authorization: Bearer $RUSH_API_KEY" -H "Content-Type: application/json" \
  -d '{"agent": "'$AGENT_ID'", "input": "Review the plugins changed in PR 412."}'

The agent fixes the harness, model, effort, instructions, skills and connections. A run can add skills, connections and resources of its own on top. The session it returns names the saved agent in agent_id.

A run of a saved agent gets the connections the agent names, plus any the run names in connections and the ones members added to the run's Project, and none of your others. See Connections.

The model is checked every time

The agent's model is checked against the catalog when you save it and again at every run. If the catalog has changed since you saved, the run is refused with 409 CATALOG_REFRESH_REQUIRED instead of running a different model. Edit the agent to pick a listed one.

Edit, revisions and delete

PATCH /o/{org}/agents/{agent} changes only the fields you send, and the result is checked against today's catalog. Each edit makes a new revision. Sessions already started keep the revision they started with; new sessions use the latest.

Every read returns an ETag for the revision you read. Send it as If-Match on a PATCH or DELETE to make sure nobody changed the agent since; a stale one is 412 STALE_ETAG. It is optional.

DELETE /o/{org}/agents/{agent} answers {"id": "…", "deleted": true}. The agent starts no new session and is no longer listed or readable. Runs already started from it run to the end.

GET /o/{org}/agents lists yours as {"agents": [...]}.

One agent per user of your app

Save the agent once as a template, then make one agent from it for each user of your app. Store the agent's id against your user; Rush never learns who your users are. Their accounts connect as in Your users' accounts.

Your users need no model account. Every run of an agent made from a template uses Rush's models, billed to you per token (Models). To charge each user for their work, list their agent's sessions with GET /o/{org}/sessions?agent=<agent id> and add up total_cost_usd.

Call, under /o/{org} Does
POST /agents with template Makes the user's agent
GET /agents?template=<id> Lists a template's agents
PATCH /agents/{agent} Changes its name or description, nothing else
DELETE /agents/{agent} Removes it and disconnects its accounts

Editing the template reaches every agent's next run.

A connection whose revoke at the vendor did not go through stays stored after DELETE, unusable by any run, until a later delete by its id or Rush's sweep revokes it.

A template that agents are still made from cannot be deleted: 409 TEMPLATE_IN_USE.