Skip to main content
Copies an agent into a new agent with its own id and its own actor. Use it to start from an agent you have already tuned instead of configuring a new one from scratch. The copy takes the source agent’s description and its latest version — model, system prompt, capabilities, policies, output, subagents, skills, model settings and runtime bindings — and starts at version 1. From then on the two agents are independent: changing either one does not affect the other. The copy does not take:
  • Version history. Only the latest version is carried over, as version 1.
  • metadata. Set it on the copy with the metadata field below.
  • Workspace bindings. Bind the copy to a workspace before you call it over A2A.
  • Memory. The copy has a new actor, so it starts without any facts of its own.
Only INTERNAL agents can be forked. Forking an EXTERNAL agent fails with AGENT_OPERATION_NOT_SUPPORTED.
Permission required: agent:create, plus agent:read on the source agent

Path Parameters

string
required
ID of the agent to copy. This endpoint does not accept by_custom_id, so pass the agent’s id.

Request Body

string
required
Your own identifier for the copy. Must be unique within your tenant and must not start with _sys_. See Your own identifiers.
string
Name of the copy, 1–255 characters. When omitted, the copy is named after the source agent with (copy) appended, for example Support Assistant (copy).
object
Key-value pairs for the copy. Values must be strings. The source agent’s metadata is not copied.
Each call creates a new agent, so retrying a request that timed out can leave you with two copies. Reuse the same custom_id when you retry: if the first call went through, the retry fails with 409 and CUSTOM_ID_CONFLICT instead of creating a second copy.

Response

Returns the new agent, with the same fields as Get Agent.
object

Errors