managed-agents-api

managed-agents-api is a skill for Claude Code from latestaiagents/agent-skills. It costs 113 tokens per session (1,393 once invoked), scanned A, original, MIT.

A guide to Anthropic's Managed Agents API, a server-run service for agents that handles the tool loop, conversation context, and scaling. It explains agents, sessions, and messages.

In plain words
What is it for?
Use it when building production agents with shared sessions across web, mobile, or command-line clients, or when you need to compare the Managed API with the Agent SDK.
Why use it?
It helps you decide whether Anthropic should operate the agent runtime for you, especially when agents run for a long time or serve several kinds of clients.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin.

Part of the claude-agent-sdk plugin — 5 skills shipped together , and of latestaiagents

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add skills/latestaiagents/agent-skills/managed-agents-api
Any agent
npx skills add latestaiagents/agent-skills --skill managed-agents-api
Clone the repo
git clone --depth 1 https://github.com/latestaiagents/agent-skills

Made for: Claude Code.

Or install claude-agent-sdk, the plugin that ships this one along with the rest of its 5 skills.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for managed-agents-api

README.md
[![agentmods](https://agentmods.dev/badge/skills/latestaiagents/agent-skills/managed-agents-api.svg)](https://agentmods.dev/skills/latestaiagents/agent-skills/managed-agents-api)
Your own site
<a href="https://agentmods.dev/skills/latestaiagents/agent-skills/managed-agents-api"><img src="https://agentmods.dev/badge/skills/latestaiagents/agent-skills/managed-agents-api.svg" alt="Measured on agentmods" height="20"></a>
Per session 113 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 1,393 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00113 $0.01393
Opus 5 $0.00056 $0.00696
Sonnet 5 $0.00023 $0.00279
Haiku 4.5 $0.00011 $0.00139

Measured 2d ago against content hash 4aa817867fd3, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade A, and why

managed-agents-api scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

skills/claude-agent-sdk/managed-agents-api/SKILL.md · 173 lines

How it starts

The opening of the file, as written. The whole thing — 173 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Managed Agents API

The Managed Agents API lets Anthropic run the agent loop server-side. You POST a user message; they run the tool loop, manage context, and stream results. You lose control but gain simplicity and durability.

When to Use

  • Production agents where you don't want to operate infrastructure
  • Long-running agents that span hours/days — server-side compaction handles it
  • Multi-client agents (web + mobile + CLI) sharing sessions
  • Scaling without worrying about loop-runner uptime

When NOT to Use

  • Agents with heavy client-side context (local files, IDE state) — SDK fits better
  • You need custom tool-execution environments not exposed by Managed
  • Debug-heavy development — self-hosted gives you more visibility

Core Objects

  1. Agent (/v1/agents) — a template: name, system prompt, tools, model
  2. Session (/v1/sessions) — a live conversation bound to an agent
  3. Message — added to a session; triggers agent run

Create an Agent

const agent = await client.beta.agents.create({
  name: "support-bot",
  description: "Customer support for ACME",
  model: "claude-sonnet-4-6",
  system_prompt: "You are ACME's support agent. Be concise and accurate.",
  tools: [
    { type: "search_tickets", name: "search_tickets", /* schema */ },
    { type: "create_escalation", name: "create_escalation" },
  ],
  mcp_servers: [
    { type: "url", url: "https://mcp.acme.com/sse", name: "acme" },
  ],
});
// Returns: { id: "agt_...", name: "support-bot", ... }

Agents are versionable — update without breaking live sessions.

Start a Session

const session = await client.beta.sessions.create({
  agent_id: agent.id,
  metadata: { user_id: "u-42", ticket_id: "T-1001" },
});
// Returns: { id: "ses_...", agent_id: "agt_...", status: "idle", ... }

Metadata is yours to use for filtering, auditing, linking to your domain.

Send a Message

const stream = client.beta.sessions.messages.stream({
  session_id: session.id,
  content: "My order #12345 is stuck — can you help?",
});

for await (const event of stream) {
  if (event.type === "text") console.log(event.delta);
  if (event.type === "tool_use") console.log("TOOL:", event.name);
  if (event.type === "done") break;
}

Read the full file on GitHub · 173 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 173 lines · 113 tokens per session scan A 4aa817867fd3

Subscribe to this mod's changes

managed-agents-api is a skill published in the GitHub repository latestaiagents/agent-skills (5 stars, last pushed 4mo ago), licensed MIT. It adds 113 tokens to every session and 1,393 once invoked, about $0.0006 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-03.

Related

Other skills, from other repositories

external-memory-plugin

Develop, adapt, review, test, and troubleshoot Nexent external memory provider plugins, including plugin.yaml manifests, searchable and ingestible provider protocols, error mapping, network-isolated unit tests, deployment configuration, and Mem0-based examples. Use when adding a new external memory vendor, changing an…

ModelEngine-Group/nexent · 85 tokens

ai-account-research-sales-card

销售增长助手适合销售、市场营销、运营、产品在用户提出“客户为什么不推进”这类问题,需要快速拆解目标、判断重点并形成可执行结果时使用,帮助基于输入材料生成摘要、诊断结论、行动建议和可复用交付物。.

skillsaiagent/aiskills · 71 tokens

ai-account-research

客户研究助手适合市场营销、运营、software、教育培训在用户提出“这个客户怎么切入”这类问题,需要快速拆解目标、判断重点并形成可执行结果时使用,帮助基于输入材料生成销售策略、沟通素材、跟进计划。.

skillsaiagent/aiskills · 65 tokens

ai-amazon-brand-analytics

Skill "ai-amazon-brand-analytics" from skillsaiagent/aiskills, covering ai-amazon-brand-analytics amazon 品牌分析助手, 概述, 什么时候使用, 调用方式 and 命令示例.

skillsaiagent/aiskills · 72 tokens

ai-amazon-international-listings

Amazon 本地化助手适合运营、产品、销售、software在用户提出“海外 Listing 说对了吗”这类问题,需要快速拆解目标、判断重点并形成可执行结果时使用,帮助基于输入材料生成商品/店铺诊断、卖点与风险提示、运营动作建议。.

skillsaiagent/aiskills · 75 tokens

ai-amazon-inventory-management

Skill "ai-amazon-inventory-management" from skillsaiagent/aiskills, covering ai-amazon-inventory-management amazon 库存诊断助手, 概述, 什么时候使用, 调用方式 and 命令示例.

skillsaiagent/aiskills · 76 tokens