Unlike local coding agents that send each tool call to Atryum before execution, Claude Managed Agents run on Anthropic's hosted infrastructure.
Under Anthropic's model, a(n):
- agent is a reusable Claude configuration — such as tools, Model Context Protocol (MCP) servers, skills, and system prompts
- environment is the hosted sandbox where sessions run
- session is one running task
- events are the session log and stream that Atryum watches
Atryum connects outbound to Anthropic and uses those events to record, evaluate, and gate tool calls — including built-in agent tools and MCP tools declared on the Claude agent:
- A session emits a tool-use event, such as
agent.tool_use,agent.mcp_tool_use, oragent.custom_tool_use. Atryum records it as an invocation and evaluates it against your rules. (Rules) - When the session pauses with
session.status_idleandrequires_action, Atryum sends Claude an allow or deny response before the tool runs. - Atryum records the later tool result from the environment on the invocation log. (Invocations)
Tools configured as always_allow run without waiting for Atryum. Atryum can record those calls afterward, but it cannot block them before execution.
Prerequisites
Before connecting Atryum to Claude Managed Agents, make sure you have:
- An Anthropic API key created in the Claude workspace that owns the managed agents you want to list and watch.
- At least one Claude Managed Agent configured in Anthropic.
- At least one tool on the Agent definition configured with the
always_askpermission. Tools set toalways_allowrun immediately in the hosted agent; Atryum can record those calls after the fact, but it cannot stop them before execution. - Atryum running with a writable database. (Quickstart)
- An Atryum agent record to link to the Claude Managed Agent. (Connect agents)
Enable Claude Managed Agents in Atryum
- Open your
atryum.tomlconfiguration file:- On macOS, this is typically under
~/Library/Application Support/atryum/atryum.toml. - On Linux, this is typically under
~/.config/atryum/atryum.toml.
- On macOS, this is typically under
- Add an
[[managed_agents]]block for each Anthropic account or workspace API key you want Atryum to use. For example:[[managed_agents]] name = "default" workspace = "anthropic-workspace-name-or-id" api_key = "sk-ant-..."- name — The local Atryum account label. Use a unique value when configuring multiple Anthropic accounts.
- workspace — A display and metadata label for the Anthropic workspace.
- api_key — An Anthropic API key created in that workspace.
- Restart Atryum so it loads the updated Claude Managed Agents credentials:
a. In the terminal where Atryum is running, press
Ctrl+Cto stop it. b. Start Atryum again:./atryum run --init-servers - Verify that the Claude Managed Agents bridge is enabled:
a. Within Atryum, click Agents in the left sidebar. b. Open an agent record by clicking on it. c. Confirm that the Claude Managed Agents section is displayed.
Link Claude Managed Agents
- Within Atryum, click Agents in the left sidebar.
- Click to open the Atryum agent record that should own the Claude Managed Agent.
- Under Claude Managed Agents, select the Claude agent(s) to link from the Linked Agents drop-down menu.
If you configured multiple
[[managed_agents]]accounts, choose the Account first. - Click Save to write Atryum ownership metadata to the Claude Managed Agent.
Set up Claude Managed Agents rules
Create a rule in Atryum to evaluate matching Claude Managed Agents tool invocations:
- Within Atryum, click Rules in the left sidebar.
- Click New Rule.
- Under Action, select your desired action. For example:
AI Evaluation(For AI Evaluation Actions) Under Evaluation Model, select the model configuration to use for the evaluation.
- Under Agents, select the Atryum agent records linked to Claude Managed Agents you want this rule to apply to. Leave this empty to match all agents.
- Under Servers / Sources, select the servers or sources the rule should apply to. Leave this empty to match all servers.
- For built-in Claude agent tools, use
claude-managed-agents. - For MCP tools declared on the Claude Managed Agent, use the MCP server name, such as
slack.
- For built-in Claude agent tools, use
- Under Tools, select the tools the rule should apply to. Leave this empty to match all tools.
- For built-in Claude agent tools, use the Claude tool name, such as
Bash. - For MCP tools, use the MCP tool name, such as
slack_send_message.
- For built-in Claude agent tools, use the Claude tool name, such as
- (Optional) Enter a Description so you can remember why the rule exists.
- Make sure that Enabled is checked, then click Create Rule.
Manage watched sessions
Atryum discovers sessions for linked Claude Managed Agents and starts watchers automatically. A watcher is Atryum's per-session connection to a running Claude Managed Agent session. For each watched session, Atryum:
- Streams session events from Anthropic and records tool calls as invocations.
- Evaluates pending tool calls against your rules when the session pauses for approval.
- Sends allow or deny responses back to Anthropic before the tool runs.
- Persists its place in the event log so it can catch up after a restart or reconnect.
Each row in the watched sessions table is one active watcher — one Claude session Atryum is listening to.
To review or clear watchers:
- Within Atryum, click Settings in the left sidebar.
- Review the watched sessions table under Claude Managed Agents.
- Click Delete to remove one stale watcher, or click Clear All to remove every watcher.
Troubleshooting
The Claude Managed Agents list shows the wrong workspace
Create or use an Anthropic API key in the workspace you want Atryum to list. Changing workspace in atryum.toml will not fix a wrong agent list.
A tool call was recorded but not blocked
Check the Claude Managed Agent's tool permission policy. If the tool is always_allow, Anthropic runs it without waiting for Atryum.
A rule did not match an MCP tool
Use the MCP server name as the rule's server pattern. For example, a Slack MCP tool call uses slack as the server pattern, not claude-managed-agents.
Old watchers keep logging errors
Within Atryum, open Settings → Claude Managed Agents and click Clear All. Linked agents can rediscover active sessions afterward.