Claude Managed Agents

Connect a Claude Managed Agent (Anthropic’s beta sessions API) to AI GO! as a native model, using the typed claude_managed_agents connection. The integration creates a session on the first turn and round-trips the session_id automatically, so multi-turn evaluations preserve conversation state.

Prerequisites

  • A Claude managed agent, and its agent ID, environment ID, and vault ID.
  • An Anthropic API key with access to the managed agents beta.

Configuration

Define the model with connection_type: claude_managed_agents and reference the API key as a secret:

key: "claude-managed-agent"
display_name: "Claude Managed Agent"
description: "Agent on Claude Managed Agents (beta sessions API), via the typed `claude_managed_agents` connection config."
task: "chat_completion"
rate_limit: 5
config:
  connection_type: "claude_managed_agents"
  agent_id: $CLAUDE_AGENT_ID
  environment_id: $CLAUDE_ENVIRONMENT_ID
  vault_id: $CLAUDE_VAULT_ID
  api_key: "<< secrets.ANTHROPIC_API_KEY >>"
secrets:
  ANTHROPIC_API_KEY: $ANTHROPIC_API_KEY

Config fields

Field Required Secret Description
connection_type yes no Must be claude_managed_agents.
agent_id yes no Identifier of the Claude managed agent to invoke.
environment_id yes no Identifier of the managed-agent environment.
vault_id yes no Identifier of the managed-agent vault.
api_key yes yes Anthropic API key.

Credentials

The secrets block uploads values (from your .env or environment) to server-side secret storage, and << secrets.NAME >> references them from the config so no key is stored in plaintext. Provide the values in your .env:

CLAUDE_AGENT_ID=...
CLAUDE_ENVIRONMENT_ID=...
CLAUDE_VAULT_ID=...
ANTHROPIC_API_KEY=sk-ant-...

Add and test

lf add model -f claude_managed_agents.yaml
lf test model claude-managed-agent

Use in an evaluation

Reference the model key from a task specification in your run config:

evaluation:
  task_specifications:
    - task_key: my-task
      model_key: "claude-managed-agent"

Conversation state

On the first turn the integration creates a session; the session_id is attached to the assistant message and reused on each subsequent turn. Tool-call events from spawned subthreads (coordinator topologies) are also collected to enrich the returned trace.