Run a remote agent
For: application developers.
Use a remote agent when the provider should run the model and agent loop while your nodes execute its tool calls. The first supported provider is Claude Managed Agents with a self-hosted environment.
Anthropic runs the loop; a node executes each session tool call in the job's sandbox.
| How an agent runs | runtime: | Where the loop runs | Where its tools run |
|---|---|---|---|
| A framework | pydantic-ai | In the job's workflow, one activity per step | On the job's node |
| A harness | harness:<name> | In one session on a node | In that session |
| Remote | remote:<name> | At the provider | On a node, in the job's sandbox, apart from the keys |
| An outside A2A agent | remote:a2a | At the outside agent's host | At the outside agent's host |
An outside agent that speaks the A2A protocol, yours or a partner's, an agent on Amazon Bedrock AgentCore Runtime or in Microsoft Foundry, can be an agent of your catalog too: see Outside A2A agents.
When to use it
- You want Anthropic's agent harness, context management and models, but your files, commands and network stay on your machines.
- The agent needs the node's tools: your MCP plugins, internal services, the repository on the node.
- You accept that the conversation, including every tool's input and output, is processed by Anthropic (see below).
Not for air-gapped sites: a node must reach api.anthropic.com.
Set it up
- In the Claude Console, create a self-hosted environment (Workspace > Environments > New > Self-hosted) and click Generate environment key. A workspace of its own for Orchestrator Zero keeps its sessions and keys apart.
- Store the API key, the environment key and the environment's ID as the tenant's secrets:
printf %s "$KEY" | oz0 secret set ANTHROPIC_MANAGED_AGENTS_KEY printf %s "$ENVIRONMENT_KEY" | oz0 secret set ANTHROPIC_ENVIRONMENT_KEY printf %s env_... | oz0 secret set ANTHROPIC_ENVIRONMENT_ID - Install the provider's plugin on the nodes that should run the tools:
oz0 plugin install <git url of the repository> --path plugins/remote-claude-managed
The agent definition
name: acme-managed-coder
description: Makes small changes to code with Claude Managed Agents.
runtime: remote:claude-managed
model:
primary: anthropic/claude-sonnet-5-5
instructions: prompts/acme-managed-coder.md
input: text
output: text
tools: [jev.check, oz.ask_user] # the node's tools it may call, and asking people
limits:
timeout: 30m
harness:
tools: [bash, read, write, edit, glob, grep] # the built-ins it gets (these are the default)
requires_approval: [bash] # a person approves each command
max_budget_usd: 5 # the session's own hard cap at Anthropic
| Harness option | What it does |
|---|---|
tools | The built-in tools the session gets: bash, read, write, edit, glob, grep, which run on the node, and web_search, web_fetch, which run at Anthropic. Every other built-in is off. |
requires_approval | Built-ins whose every call waits for a person, as claude-managed.<tool> in the approvals inbox. |
max_budget_usd | Becomes the provider session's budget (max_list_cost): Anthropic stops the session there, whatever happens on the node. |
session_hour_usd | What an hour of a session's running time costs, for the cost split below; $0.08 by default. |
workspace | The Console workspace's ID, to link each session's trace view in the live stream. |
keep_session | Leave sessions open at Anthropic when they end, instead of archiving them (they are marked oz0_ended in their metadata). |
There is no option for the API's address: any plugin may define an agent on claude-managed, and an agent definition must not choose where the tenant's keys go, so harness: api_url fails plugin lint and the job. Sessions go to https://api.anthropic.com. A node's operator can point a remote harness elsewhere, such as at a gateway in front of the API or a test's fake, with an environment variable of the node:
OZ0_REMOTE_API_URLS="claude-managed=https://anthropic-gateway.internal" oz0-node run
The address must be https, or http to the node itself.
limits.max_steps counts the session's model requests at Anthropic, over all its segments: the request after the last one allowed ends the session and fails the job. Without it, Anthropic's own limits and max_budget_usd apply.
Tools, hooks and approvals name the built-ins claude-managed.bash, claude-managed.write and so on, as for any harness. The node's tools keep their own names (jev.check).
Related tasks
- Remote sessions and limits: Understand execution, cost and data leaving the network.
- Connect an outside A2A agent: Add a remote A2A service to your tenant catalog.
Previous section links
- Section: amazon bedrock agentcore and microsoft foundry
- Section: an outside agent is its cards origin
- Section: budgets what they bound and what they cannot
- Section: calls back into this cluster
- Section: cost
- Section: input from outside
- Section: limits today
- Section: outside a2a agents
- Section: stopping
- Section: the audit log
- Section: what happens in a job
- Section: what happens in a job 1
- Section: what leaves your network
- Section: what leaves your network 1
- Section: when a node is lost
- Section: where the keys are