client.agents. The names that differ:
What an API key can do
The key acts as an admin of its own organization. This frames every resource of this guide, and of Skills and Sources.
Everything the key creates is owned by the user who created the key. The
agent’s
owner is that user’s id, not the key’s. Call that user the key owner.
Find the values you need
An agent refers to integrations and models by id. Read them from the API.- Python SDK
- JavaScript SDK
- HTTP
- A server’s
nameis the value to store in theconnectionsof the MCP capability. By default,mcp.list()keeps only the integrations that are turned on. Setenabledto null to see every server. Seeclient.mcpin the Python SDK and JavaScript SDK references. requires_oauth_connectis true when someone must connect the integration with OAuth in the console first. See MCP integrations.- A model’s
idgoes in the agent’s model chain.
Create an agent
- Python SDK
- JavaScript SDK
- HTTP
scopeis"private"(the key owner only, the default) or"organization"(every member).- A capability you do not set gets its default, here
memory: never. Over HTTP, the capabilities you did not set come back asnull. The SDKs leave them out. - Omit the model ids to use the organization’s default model chain.
capabilities.memorysets the agent’s memory namespace. The olderexecution_optionsandmemory_namespacefields are deprecated, and the SDKs do not accept them.- Capabilities work as on a thread. See Capabilities. The agent’s capabilities are the saved default of the first of the three layers.
Chat with it
Use the id like any other agent.- Python SDK
- JavaScript SDK
- HTTP
subagent call, not the integration’s tool names. To turn MCP off for one
message, send a message scope that sets mcp to enabled false. See
Keep some connections, or none.
Update an agent
An update is partial: send only what you want to change.- Python SDK
- JavaScript SDK
- HTTP
- A null value (
Nonein Python,nullin JavaScript and HTTP) clearsdescription,instructions, andcapabilities. capabilitiesis merged capability by capability. Each capability you send replaces the stored one, and the others stay. In the example,webchanged andmcpwas kept.- You cannot clear
name,scope, or the override flag. The SDKs raiseInvalidParamsfor a null value there, and for an update with no argument. - An organization agent owned by someone else can be updated and deleted with the key.
Choose the models
An agent has a model chain. The first model answers, and the next ones take over when it fails.- Python SDK
- JavaScript SDK
- HTTP
- An unknown id returns 404 with
detailBad model_ids. An empty list returns 422. The SDKs raiseInvalidParamsfor an empty list, before any request. - The model ids on
createset the chain at creation. Omit them for the organization’s default chain.
Read and delete
- Python SDK
- JavaScript SDK
- HTTP
list returns the built-in agents (managed is true), the organization
agents, and the key owner’s private agents. A private agent of another member is
not there, and get, update, and delete on it return 404.
A delete is permanent. The messages the agent handled keep working, and report
their agent as "ARCHIVED".
Errors
For the error classes, see the Python SDK reference
and the JavaScript SDK reference.
Next steps
Skills
Upload a skill and give it to an agent.
Sources
Index local files and let an agent search them.