Anthropic Managed Agents

Discover, monitor, and add guardrails to Anthropic Managed Agents running on Anthropic's hosted infrastructure.

Beta

Anthropic Managed Agents is currently in beta. The NodeLoom integration uses the 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:

DataSourceDependency Type
Agent name, description, versionGET /v1/agents
Model (e.g., claude-sonnet-4-6)Agent model fieldMODEL
Built-in tools (bash, edit, web_search, etc.)agent_toolset configsTOOL
Custom toolsCustom tool definitionsTOOL
MCP serversAgent mcp_servers arrayMCP_SERVER
SkillsAgent skills array

Setup

1

Go to Agent Inventory → Integrations

Click Add Integration and select Anthropic Managed Agents.

2

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).

3

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

Unlike AWS (region) or Azure (subscription ID), Anthropic Managed Agents only requires an API key. The scan discovers all agents in your organization automatically.

Session Monitoring

Once the integration is enabled, NodeLoom automatically monitors active sessions every 60 seconds:

  • Polls GET /v1/sessions for 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 ConceptNodeLoom Equivalent
AgentDiscoveredAgent
SessionWorkflowExecution
Session statusExecutionStatus (RUNNING / SUCCESS)
Token usageTokenUsageHistory 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

bash
pip install nodeloom anthropic
main.py
from 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":
                    break

TypeScript

bash
npm install @nodeloom/sdk @anthropic-ai/sdk
main.ts
import { 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

Main.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

main.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

CapabilityScanner OnlyScanner + SDK
Agent discoveryYesYes
Model/tool/MCP dependenciesYesYes
Risk scoreYesYes
Session monitoringYesYes
Token usage trackingYesYes
Anomaly detectionYesYes
Drift alertsYesYes
Per-event tracesNoYes
Input guardrails (blocking)NoYes
Output guardrails (blocking)NoYes
PII redactionNoYes
Prompt injection detectionNoYes