Skip to main content
Use agents() for your own agent registrations. To discover built-in harnesses, use meta. Method reference: calls, parameters, and response fields. Examples reuse the SDK setup. Run Python snippets inside the async function shown in the Python guide.

Register an agent

Provide a local source directory or an install script, plus the command that runs your agent.
The example assumes ./my-agent contains that runnable program. See the custom-agent contract for how it receives a task and produces output. Choose exactly one of directory and install_script. Discover naming, reserved environment keys, and size limits through meta().agent_registration. Store credentials as secrets.

Use the registration

Name it in a job’s agents list just like a built-in harness:
Use the model your custom agent is written to run. Registration does not make every model compatible with its implementation.

Read or replace

List scopes are my, shared, and org. Upsert accepts the same fields as create except name, which is its first argument.
Upsert is a full replacement. Include every setting you want to retain; omitting env clears it. It avoids the gap created by deleting and then registering again.
Deleting a registration does not rewrite the agent identity already recorded on past jobs.
Last modified on November 9, 2026