Anthropic Managed Agents
Discover, monitor, and add guardrails to Anthropic Managed Agents running on Anthropic's hosted infrastructure.
Beta
managed-agents-2026-04-01 beta header automatically.What It Discovers
NodeLoom connects to the Anthropic API and enumerates all Managed Agents in your organization. For each agent, it extracts:
| Data | Source | Dependency Type |
|---|---|---|
| Agent name, description, version | GET /v1/agents | — |
| Model (e.g., claude-sonnet-4-6) | Agent model field | MODEL |
| Built-in tools (bash, edit, web_search, etc.) | agent_toolset configs | TOOL |
| Custom tools | Custom tool definitions | TOOL |
| MCP servers | Agent mcp_servers array | MCP_SERVER |
| Skills | Agent skills array | — |
Setup
Go to Agent Inventory → Integrations
Click Add Integration and select Anthropic Managed Agents.
Enter your Anthropic API key
Paste your API key (sk-ant-...). It is encrypted with AES-256-GCM and stored securely. The key must have access to the Managed Agents beta (enabled by default for all API accounts).
Click Add & Scan
NodeLoom calls GET /v1/agents to list all your agents. Each agent appears in the inventory with its model, tools, MCP servers, and an auto-calculated risk score.
No config fields needed
Session Monitoring
Once the integration is enabled, NodeLoom automatically monitors active sessions every 60 seconds:
- Polls
GET /v1/sessionsfor each discovered agent - Maps each session to a WorkflowExecution so all existing monitoring works automatically
- Tracks session status transitions (running, idle, terminated)
- Records token usage with prompt/completion cost breakdown
| Anthropic Concept | NodeLoom Equivalent |
|---|---|
| Agent | DiscoveredAgent |
| Session | WorkflowExecution |
| Session status | ExecutionStatus (RUNNING / SUCCESS) |
| Token usage | TokenUsageHistory with cost tracking |
Because sessions map to standard executions, all existing monitoring hooks activate automatically:
- Anomaly detection (duration and token spikes)
- Drift alerts (behavioral changes over time)
- LLM evaluation scoring (if configured)
- Token budget alerts (80% / 95% thresholds)
- Incident playbooks (automated responses)
Adding Guardrails with the SDK
The discovery scanner provides passive monitoring. For real-time guardrails (blocking unsafe input/output before it reaches the agent or the user), add the NodeLoom SDK handler to your orchestration code:
Python
pip install nodeloom anthropicfrom nodeloom import NodeLoom
from nodeloom.integrations.anthropic import ManagedAgentsHandler
from anthropic import Anthropic
nodeloom = NodeLoom(api_key="sdk_...")
anthropic_client = Anthropic()
handler = ManagedAgentsHandler(nodeloom, agent_name="my-agent")
session = anthropic_client.beta.sessions.create(
agent="agent_...", environment_id="env_...")
with handler.trace_session(session.id) as ctx:
# Check input before sending
result = ctx.check_input(user_message)
if not result["passed"]:
print("Input blocked:", result["violations"])
else:
with anthropic_client.beta.sessions.events.stream(session.id) as stream:
anthropic_client.beta.sessions.events.send(session.id, events=[
{"type": "user.message",
"content": [{"type": "text", "text": user_message}]}
])
for event in stream:
ctx.on_event(event) # Auto-creates spans
if event.type == "session.status_idle":
breakTypeScript
npm install @nodeloom/sdk @anthropic-ai/sdkimport { NodeLoomClient } from "@nodeloom/sdk";
import { ManagedAgentsHandler } from "@nodeloom/sdk/integrations/anthropic";
import Anthropic from "@anthropic-ai/sdk";
const nodeloom = new NodeLoomClient({ apiKey: "sdk_..." });
const anthropic = new Anthropic();
const handler = new ManagedAgentsHandler(nodeloom, "my-agent");
const session = await anthropic.beta.sessions.create({
agent: "agent_...", environment_id: "env_..."
});
const ctx = handler.traceSession(session.id);
await ctx.checkInput(userMessage);
const stream = await anthropic.beta.sessions.events.stream(session.id);
await anthropic.beta.sessions.events.send(session.id, {
events: [{ type: "user.message",
content: [{ type: "text", text: userMessage }] }]
});
for await (const event of stream) {
ctx.onEvent(event); // Auto-creates spans
if (event.type === "session.status_idle") break;
}
ctx.end();Java
NodeLoom nodeloom = NodeLoom.builder().apiKey("sdk_...").build();
AnthropicManagedAgentsHandler handler = AnthropicManagedAgentsHandler.builder()
.client(nodeloom)
.agentName("my-agent")
.build();
try (var session = handler.traceSession("sess_...")) {
session.checkInput(userMessage);
// Process Anthropic event stream...
session.onEvent("agent.message", eventData);
session.onEvent("agent.tool_use", toolData);
}Go
import "github.com/nodeloom/nodeloom-sdk-go/integrations/anthropic"
client := nodeloom.New("sdk_...")
defer client.Close()
handler := anthropic.New(client, "my-agent")
session := handler.TraceSession("sess_...")
defer session.End()
session.CheckInput(userMessage)
// Process Anthropic event stream...
session.OnEvent("agent.message", eventData)
session.OnEvent("agent.tool_use", toolData)What You Get
| Capability | Scanner Only | Scanner + SDK |
|---|---|---|
| Agent discovery | Yes | Yes |
| Model/tool/MCP dependencies | Yes | Yes |
| Risk score | Yes | Yes |
| Session monitoring | Yes | Yes |
| Token usage tracking | Yes | Yes |
| Anomaly detection | Yes | Yes |
| Drift alerts | Yes | Yes |
| Per-event traces | No | Yes |
| Input guardrails (blocking) | No | Yes |
| Output guardrails (blocking) | No | Yes |
| PII redaction | No | Yes |
| Prompt injection detection | No | Yes |