From managed-agents
Build Anthropic Managed Agents through a non-technical conversation. The skill asks the user what kind of agent they want, which connectors and abilities it should have, and then silently translates that into Anthropic's Managed Agents REST API: creates the Agent, Environment, Vault and credentials, attaches MCP servers and Skills, opens a Session, and sends a first message. Hides the developer details. USE THIS SKILL WHEN user says "agent builder", "build an agent", "create an agent", "managed agent", "managed agents", "deploy an agent", "anthropic agent", "agent platform", "agents API", "agent session", "agent environment", "agent vault", "upload skill", "attach skill", "/v1/agents", "/v1/skills", or wants to spin up an autonomous agent that runs on Anthropic's managed infrastructure with connectors and skills.
How this skill is triggered — by the user, by Claude, or both
Slash command
/managed-agents:agent-builderThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
Build Anthropic Managed Agents through a friendly, non-technical conversation. The user picks what they want; this skill quietly translates it into the right API calls.
Build Anthropic Managed Agents through a friendly, non-technical conversation. The user picks what they want; this skill quietly translates it into the right API calls.
references/. Do not narrate this.AskUserQuestion.Opener (example, vary as needed):
"Let's build your agent. A few quick questions and I'll set everything up for you."
Every branching question MUST go through AskUserQuestion, never plain chat. Plain chat is reserved for short confirmations and the final summary. Use the descriptions inside each option to teach the concept (what a connector is, what a skill is, etc.) so the user never has to know the underlying terms.
Run the questions in this order. Skip a question if the user already volunteered the answer earlier in the conversation.
Use AskUserQuestion. Header: Agent type. Options (single-select):
If "Custom", follow up with a single open question: "In one sentence, what should this agent do?"
Internally, use the answer to seed a short system prompt. The user never sees the word "system prompt".
First, in chat, explain in one sentence:
"Connectors are the apps your agent can read from and act on, like Slack, Gmail, or Notion. Pick whichever this agent needs."
Then use AskUserQuestion with multiSelect: true. Header: Connectors. Options:
If the user names something not in the list (e.g. Stripe, Linear, HubSpot, Calendly, Intercom), accept it as another connector to add. Do NOT ask the user for the MCP server URL. You find it yourself.
For every connector picked (preset or user-named), resolve the official remote MCP endpoint by web search. Do this silently in the background; do not show search results in chat. Use WebSearch (or the available web search tool) with a query like "<connector> official remote MCP server URL" and prefer hits from:
stripe.com/docs/mcp, developers.notion.com/docs/mcp).https://mcp.so or https://pulsemcp.com).If web search returns nothing trustworthy after two tries, then (and only then) ask the user once for the URL. Never invent or guess a URL.
Default URLs you can use without searching (only if exact match):
https://mcp.slack.com/mcphttps://api.githubcopilot.com/mcp/https://mcp.stripe.com/For every selected connector, internally:
{ "type": "url", "name": <slug>, "url": <resolved_url> } to mcp_servers.{ "type": "mcp_toolset", "mcp_server_name": <slug>, ... } to tools.Do not collect any access tokens or OAuth credentials in this flow. The agent is built with MCP servers attached but no vault credentials. The user authorizes each connector later in the Anthropic dashboard (OAuth flow there). When you create the vault in the build phase, create it empty.
In the final summary, tell the user clearly which connectors still need to be authorized, and link them to where they do it. Example one-liner: "You'll need to authorize Gmail and Stripe once in the Anthropic console before the agent can use them."
Explain in one sentence:
"These are the built-in things the agent can do on its own without needing an outside app."
Use AskUserQuestion, multiSelect: true. Header: Abilities. Options:
Internally map to the agent_toolset_20260401 configs array: enable read/write/edit/glob/grep for files, bash for code, web_search, web_fetch. Anything not picked is disabled.
Use AskUserQuestion, multiSelect: true. Header: Documents. Options:
Map each pick to an { "type": "anthropic", "skill_id": "<xlsx|pptx|docx|pdf>" } entry in skills.
If the user mentions they already have a custom skill folder, follow up: "Where's the folder? I'll upload it for you." Then upload via POST /v1/skills (see references/skills-upload.md) and attach the returned skill_id as { "type": "custom", "skill_id": "...", "version": "latest" }.
Use AskUserQuestion. Header: Style. Options (single-select):
Map:
permission_policy: { "type": "always_allow" } everywhere.always_allow for built-in tools, always_ask for mcp_toolset entries.Use AskUserQuestion. Header: Brainpower. Options (single-select):
Map:
{"id": "claude-opus-4-7", "speed": "standard"}"claude-sonnet-4-6""claude-haiku-4-5-20251001"If the user picks "Smartest" and the task sounds simple/repetitive, gently suggest "Balanced" once.
In chat (no AskUserQuestion here, it's free text):
"Last bit: what should I call this agent, and can you give me one sentence describing its job?"
Capture two short strings.
The only secret you ever ask for is the Anthropic API key. Connector authorization (OAuth, access tokens) is NOT handled in this flow. The user will authorize each connector later in the Anthropic console.
API key. Ask once: "I'll need your Anthropic API key (starts with sk-ant-). I'll only use it for this session and won't write it down."
Export as ANTHROPIC_API_KEY in the shell.
Run the build. Without narrating each call, execute in order:
POST /v1/agents with the assembled body (includes mcp_servers and matching mcp_toolset entries, but no credentials).POST /v1/environments.POST /v1/vaults with the chosen display_name. Do NOT add any credentials. Leave the vault empty.POST /v1/sessions referencing the empty vault. The session creates fine; MCP calls will simply error until the user authorizes the connectors.While these run, send ONE chat update like: "Setting up your agent…" Do not list every step.
Final summary. Present a clean, non-technical recap:
✅ Your agent "${name}" is ready.
What it can do:
- ${ability_summary}
- Connected to: ${connector_names}
- Document skills: ${doc_skills or "none"}
- Style: ${style}
Before it can actually use your connectors, authorize them once:
→ Open https://console.anthropic.com/agents/${agent_id}
→ For each connector listed (${connector_names}), click Connect and sign in.
To use it again, here are the IDs (keep them safe):
Agent ID: ${agent_id}
Session ID: ${session_id}
If only ${connector_names} is empty, drop the authorize-them block. If connectors exist, always show it.
Offer 3 follow-ups via AskUserQuestion (header: Next):
AskUserQuestion for branching choices. Plain prompts in chat are reserved for free-text answers (name, description, custom system-prompt sentence, pasting tokens).mcp_servers entry and a matching mcp_toolset. The API rejects mismatches.references/api-reference.md. Endpoints, methods, headers, response shapes.references/payloads.md. JSON bodies for every API call.references/tools-reference.md. Built-in tool names, configs, permission policies, custom tools.references/mcp-and-vaults.md. MCP server declaration, vault creation, credential types, error handling.references/skills-upload.md. Uploading and attaching custom and pre-built skills.Provides C# and .NET testing patterns using xUnit, FluentAssertions, NSubstitute, Testcontainers, and WebApplicationFactory for unit and integration tests.
npx claudepluginhub benaios/benai-skills-main --plugin managed-agents