Save an agent.

POST/o/{org}/agents
View .md

A harness with its model, effort, instructions, skills, connections, runtime, tools and plugins, to start sessions from by sending its id as agent. Skills are fetched and pinned when the agent is saved (a GitHub source to its commit, any other to its content), and every session from the agent loads exactly that pin. handle and catalog_revision are optional: the handle defaults to one from the name and the body, the revision to the catalog's current one. From a key, a field this route does not take is 400 UNKNOWN_FIELD, and defaults and connection_refs are 400 FIELD_REMOVED. A person signed in to the console may send the same body, saves the same agent and reads it back in the same shape. From a session, the console editor's defaults and connection_refs are also taken in place of model, effort and connections, and model, effort, connections or skills beside them is 400 INVALID_BODY. A refused body is 422 with a code, and per-field fields where the catalog does not support a choice (UNSUPPORTED_PROFILE, with field codes such as UNKNOWN_MODEL and INVALID_EFFORT).

Send template instead to make an agent from a saved agent, one per user of your own app: it runs the template's current instructions, harness, model, skills and capabilities, and the accounts and MCP servers connected to it alone (POST /o/{org}/agents/{agent}/connections). The agent stands for your user, with no end-user field: an account connected to it belongs to that agent only, never to your own runs or another agent. Your user signs in to Rush's OAuth app, so you register none. You keep the map from your user to the agent id. It takes only template, name, description and handle; any field the template sets is 422 TEMPLATE_FIELDS.

A retry needs no key: the same body again in this org answers 200 with the agent it made, by its handle when you sent one, else by the body itself. Another body on a handle you sent is 409 HANDLE_TAKEN. A deleted agent frees its handle, so adding the same listing after a delete makes a new agent. An Idempotency-Key header is ignored.

Authenticate with a signed-in session token (an API key cannot call this route).

Path parameters

orgstringrequired

The org's slug or id. A caller with no role in the org gets 404.

Request body

Responses

200The same body again; the agent it made.
visibilitystringrequired

Private by default; org makes the agent usable by current org members; public lists it in Community once Phoenix approves it.

One ofprivateorgpublic
listingobjectoptional

What Community serves of the agent, present once Phoenix has approved a revision; your own org reads it.

8 fields
statestringrequired
One oflistedwithdrawnremoved
categorystringrequired
One ofEngineeringBusinessMarketingGeneral
subtitlestringrequired
at most 30 characters
listed_revisionintegerrequired

The revision Community lists and its adders run.

triggersarray of stringoptional

How the listed agent starts, by kind.

notestringoptional

Phoenix's note on a removal.

logo_urlstringoptional

The listed square logo: a public image URL that never changes.

cover_urlstringoptional

The listed wide cover image: a public image URL that never changes.

reviewobjectoptional

A revision submitted to Community that Phoenix has not decided, or turned down.

8 fields
revisionintegerrequired
categorystringrequired
One ofEngineeringBusinessMarketingGeneral
subtitlestringrequired
at most 30 characters
triggersarray of stringoptional
statestringrequired
One ofin_reviewrejected
notestringoptional

Why Phoenix turned it down.

logo_urlstringoptional

The logo submitted with this revision.

cover_urlstringoptional

The cover submitted with this revision.

idstringrequired
Format uuid
templatestringoptional

Present on an agent made from a template; everything but its name and description is the template's.

Format uuid
addedbooleanoptional

Present on an agent added from a Community listing; it runs the listed revision and never shows the maker's setup.

One oftrue
user_idstringrequired

Its creator.

Format uuid
org_idstringrequired
Format uuid
namestringrequired
handlestringrequired
descriptionstringoptional
harnessstringrequired

Launch-boundary managed harnesses.

One ofclaudecodexopencode
revisionintegerrequired

The revision read, the number its ETag carries and an edit's If-Match names.

archivedbooleanoptional

Present on a deleted agent, which starts no run.

One oftrue
sourceobjectoptional

What the agent was made from, when it was made from another agent or a catalog harness. Only its creator reads it.

catalog_revisionstringrequired

The catalog revision the agent was last saved against.

runtimeobjectrequired

{selection: "latest_verified"} keeps the harness CLI current; {selection: "pinned", id} holds one release.

2 fields
selectionstringrequired
One oflatest_verifiedpinned
idstringoptional
modelstringrequired
effortstringoptional
speedstringrequired
One ofstandardfast
instructionsstringoptional
skillsarray of objectoptional
2 item fields
urlstringrequired
Format uri
namestringrequired
connectionsarray of objectoptional

The agent's connections from GET /me/connections, each with the name a run's connections takes. A deleted connection has no name. On an agent made from a template, one entry per connection the template names: id is the agent's own account of that app, absent until connected. Anyone but the agent's creator reads each by its app's name (and an MCP server's own display_name), never the creator's id.

5 item fields
idstringoptional
kindstringoptional

The kind of connection, as GET /me/connections names it.

namestringoptional
display_namestringoptional
accessstringoptional

read: read mail (and Outlook contacts). send: read and send. Absent: all of the app's access, which for Gmail also changes labels and for Outlook is the same as send.

One ofreadsend
missing_connectionsarray of objectoptional

On an agent made from a template, each connection its template names that a run of it lacks; absent once there are none. Every run of this agent is 422 CONNECTION_NOT_READY until each is connected. A read of an older revision (?revision=) reports what that revision's connections lack. It checks that an account exists, not its access level: an account connected below what the template now names (a raised level, or a dropped one, which asks for all of the app) is not listed. Until it is connected again, a run is accepted and then ends failed with CONNECTION_UNAVAILABLE, not the 422 above.

2 item fields
namestringoptional

The connection's name; absent when the template owner's connection was deleted.

whosestringrequired

Who connects it: agent, this agent's user, at /o/{org}/agents/{agent}/connections (an agent added from a Community listing, its person at /me/connections); template, the template's owner, whose own connection has lapsed or was deleted. A lapsed one clears when the owner signs in to the same account again at /me/connections; for a deleted one or another account, the owner connects it and then PATCHes the template's connections (keeping the access of any that has one), since the template names a connection by its id.

One ofagenttemplate
connections_addedarray of stringoptional

In a PATCH answer for a template that agents are made from, the connection names the edit added (a connection that replaces a deleted one counts as added). An agent made from it that has no account of one needs its user to connect it; GET /o/{org}/agents?template=<id> names each agent's missing_connections. Absent when the edit added none.

capabilitiesobjectoptional

Present when browser or computer use is on.

2 fields
browserbooleanoptional
computerbooleanoptional
toolsobjectoptional

Present when the agent allows only some tools: {mode: "selected", ids}, with ids left out when it allows none.

networkobjectoptional

Present when the agent reaches only some domains: {mode: "allowlist", domains}, with domains left out when it reaches none.

pluginsarray of objectoptional

The catalog plugins the agent installs, by catalog_id.

1 item fields
catalog_idstringrequired
created_atstringrequired
Format date-time
updated_atstringrequired
Format date-time
201The saved agent.
visibilitystringrequired

Private by default; org makes the agent usable by current org members; public lists it in Community once Phoenix approves it.

One ofprivateorgpublic
listingobjectoptional

What Community serves of the agent, present once Phoenix has approved a revision; your own org reads it.

8 fields
statestringrequired
One oflistedwithdrawnremoved
categorystringrequired
One ofEngineeringBusinessMarketingGeneral
subtitlestringrequired
at most 30 characters
listed_revisionintegerrequired

The revision Community lists and its adders run.

triggersarray of stringoptional

How the listed agent starts, by kind.

notestringoptional

Phoenix's note on a removal.

logo_urlstringoptional

The listed square logo: a public image URL that never changes.

cover_urlstringoptional

The listed wide cover image: a public image URL that never changes.

reviewobjectoptional

A revision submitted to Community that Phoenix has not decided, or turned down.

8 fields
revisionintegerrequired
categorystringrequired
One ofEngineeringBusinessMarketingGeneral
subtitlestringrequired
at most 30 characters
triggersarray of stringoptional
statestringrequired
One ofin_reviewrejected
notestringoptional

Why Phoenix turned it down.

logo_urlstringoptional

The logo submitted with this revision.

cover_urlstringoptional

The cover submitted with this revision.

idstringrequired
Format uuid
templatestringoptional

Present on an agent made from a template; everything but its name and description is the template's.

Format uuid
addedbooleanoptional

Present on an agent added from a Community listing; it runs the listed revision and never shows the maker's setup.

One oftrue
user_idstringrequired

Its creator.

Format uuid
org_idstringrequired
Format uuid
namestringrequired
handlestringrequired
descriptionstringoptional
harnessstringrequired

Launch-boundary managed harnesses.

One ofclaudecodexopencode
revisionintegerrequired

The revision read, the number its ETag carries and an edit's If-Match names.

archivedbooleanoptional

Present on a deleted agent, which starts no run.

One oftrue
sourceobjectoptional

What the agent was made from, when it was made from another agent or a catalog harness. Only its creator reads it.

catalog_revisionstringrequired

The catalog revision the agent was last saved against.

runtimeobjectrequired

{selection: "latest_verified"} keeps the harness CLI current; {selection: "pinned", id} holds one release.

2 fields
selectionstringrequired
One oflatest_verifiedpinned
idstringoptional
modelstringrequired
effortstringoptional
speedstringrequired
One ofstandardfast
instructionsstringoptional
skillsarray of objectoptional
2 item fields
urlstringrequired
Format uri
namestringrequired
connectionsarray of objectoptional

The agent's connections from GET /me/connections, each with the name a run's connections takes. A deleted connection has no name. On an agent made from a template, one entry per connection the template names: id is the agent's own account of that app, absent until connected. Anyone but the agent's creator reads each by its app's name (and an MCP server's own display_name), never the creator's id.

5 item fields
idstringoptional
kindstringoptional

The kind of connection, as GET /me/connections names it.

namestringoptional
display_namestringoptional
accessstringoptional

read: read mail (and Outlook contacts). send: read and send. Absent: all of the app's access, which for Gmail also changes labels and for Outlook is the same as send.

One ofreadsend
missing_connectionsarray of objectoptional

On an agent made from a template, each connection its template names that a run of it lacks; absent once there are none. Every run of this agent is 422 CONNECTION_NOT_READY until each is connected. A read of an older revision (?revision=) reports what that revision's connections lack. It checks that an account exists, not its access level: an account connected below what the template now names (a raised level, or a dropped one, which asks for all of the app) is not listed. Until it is connected again, a run is accepted and then ends failed with CONNECTION_UNAVAILABLE, not the 422 above.

2 item fields
namestringoptional

The connection's name; absent when the template owner's connection was deleted.

whosestringrequired

Who connects it: agent, this agent's user, at /o/{org}/agents/{agent}/connections (an agent added from a Community listing, its person at /me/connections); template, the template's owner, whose own connection has lapsed or was deleted. A lapsed one clears when the owner signs in to the same account again at /me/connections; for a deleted one or another account, the owner connects it and then PATCHes the template's connections (keeping the access of any that has one), since the template names a connection by its id.

One ofagenttemplate
connections_addedarray of stringoptional

In a PATCH answer for a template that agents are made from, the connection names the edit added (a connection that replaces a deleted one counts as added). An agent made from it that has no account of one needs its user to connect it; GET /o/{org}/agents?template=<id> names each agent's missing_connections. Absent when the edit added none.

capabilitiesobjectoptional

Present when browser or computer use is on.

2 fields
browserbooleanoptional
computerbooleanoptional
toolsobjectoptional

Present when the agent allows only some tools: {mode: "selected", ids}, with ids left out when it allows none.

networkobjectoptional

Present when the agent reaches only some domains: {mode: "allowlist", domains}, with domains left out when it reaches none.

pluginsarray of objectoptional

The catalog plugins the agent installs, by catalog_id.

1 item fields
catalog_idstringrequired
created_atstringrequired
Format date-time
updated_atstringrequired
Format date-time
400An unknown field (UNKNOWN_FIELD), a removed one (FIELD_REMOVED), a malformed connections or skills entry, or, from a session, model, effort, connections or skills beside the console editor's config (INVALID_BODY).
errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional
401No bearer, an unknown, revoked or expired one, or an API key on a route keys cannot call.
errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional
403A template someone else created (FORBIDDEN); only a template's creator makes agents from it.
errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional
404No such resource for the caller, including one in an org the caller is not in or a Project that is private to someone else.
errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional
409HANDLE_TAKEN: the handle you sent holds a live agent made from another body or in another org.

HANDLE_TAKEN: the handle you sent holds a live agent made from another body or in another org. A body with no handle is refused only if the handle it derives, and that handle with the org added, are both taken: the same body in another org saves an agent there.

errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional
422Body refused: INVALID_NAME, INVALID_HANDLE, INVALID_DESCRIPTION, INVALID_HARNESS, INVALID_CATALOG, CATALOG_REFRESH_REQUIRED (a stale catalog_revision), INVALID_INSTRUCTIONS, INVALID_MODEL, INVALID_EFFORT, UNSUPPORTED_PROFILE (a model the harness does not list, or an effort that model does not take), a connection that is not one of yours or not connected (CONNECTION_NOT_READY, CONNECTION_AMBIGUOUS), or a skill that cannot be fetched (SKILL_FETCH_FAILED, SKILL_INVALID).

Body refused: INVALID_NAME, INVALID_HANDLE, INVALID_DESCRIPTION, INVALID_HARNESS, INVALID_CATALOG, CATALOG_REFRESH_REQUIRED (a stale catalog_revision), INVALID_INSTRUCTIONS, INVALID_MODEL, INVALID_EFFORT, UNSUPPORTED_PROFILE (a model the harness does not list, or an effort that model does not take), a connection that is not one of yours or not connected (CONNECTION_NOT_READY, CONNECTION_AMBIGUOUS), or a skill that cannot be fetched (SKILL_FETCH_FAILED, SKILL_INVALID). With template: a field the template sets (TEMPLATE_FIELDS), or a template that is itself made from a template or names two templates (INVALID_BODY).

errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional
429The account is over its request budget, 1,800 a minute shared by the person's API keys and console on every API host (RATE_LIMITED).

The account is over its request budget, 1,800 a minute shared by the person's API keys and console on every API host (RATE_LIMITED). The error names the limit. Wait Retry-After seconds.

errorstringoptional

A sentence for a person.

codestringoptional

Stable machine code, e.g. AUTH_FAILED, NOT_FOUND, VALIDATION_ERROR, RATE_LIMITED, TOKEN_LIMIT_REACHED.

error_codestringoptional

The machine code on routes that name it this way.

messagestringoptional
requestIdstringoptional

Used in