anthropic-managed-agents
Anthropic Managed Agents API for programmatically creating, running, and streaming AI agents on Anthropic's cloud infrastructure. Use when the user mentions "Managed Agents", "Anthropic agent sessions", or needs to create/run/stream an Anthropic agent with tool use (bash, git, web), attach GitHub repositories, or inject secrets via Vault. Do NOT use for standard Claude Messages API — use the Claude API skill instead.
What this skill does
## Troubleshooting
If requests fail, run `zero doctor check-connector --env-name ANTHROPIC_MANAGED_AGENTS_TOKEN` or `zero doctor check-connector --url https://api.anthropic.com/v1/agents --method POST`
## How to Use
All examples assume `ANTHROPIC_MANAGED_AGENTS_TOKEN` is set. The base URL is `https://api.anthropic.com`.
### 1. Create an Agent
An agent is a reusable configuration (model + system prompt + toolset). Create it once; use it across many sessions.
Write to `/tmp/agent_create.json`:
```json
{
"model": "claude-sonnet-4-6",
"name": "Code Review Agent",
"description": "Reviews pull requests and suggests improvements",
"system": "You are an expert code reviewer. Analyze the code in the mounted repository, identify issues, and provide actionable feedback.",
"tools": [
{
"type": "agent_toolset_20260401"
}
]
}
```
Then run:
```bash
curl -s -X POST "https://api.anthropic.com/v1/agents" \
-H "x-api-key: $ANTHROPIC_MANAGED_AGENTS_TOKEN" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: managed-agents-2026-04-01" \
-H "Content-Type: application/json" \
-d @/tmp/agent_create.json | jq '{id: .id, name: .name}'
```
Save the returned `id` (e.g., `agent_011CZk...`) for use in sessions.
**Built-in tools in `agent_toolset_20260401`:** `bash`, `edit`, `read`, `write`, `glob`, `grep`, `web_fetch`, `web_search`
**Available models:** `claude-opus-4-6`, `claude-sonnet-4-6`, `claude-haiku-4-5`
### 2. List Agents
```bash
curl -s "https://api.anthropic.com/v1/agents" \
-H "x-api-key: $ANTHROPIC_MANAGED_AGENTS_TOKEN" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: managed-agents-2026-04-01" | jq '.data[] | {id: .id, name: .name, model: .model}'
```
### 3. Get an Agent
```bash
curl -s "https://api.anthropic.com/v1/agents/<AGENT_ID>" \
-H "x-api-key: $ANTHROPIC_MANAGED_AGENTS_TOKEN" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: managed-agents-2026-04-01" | jq '.'
```
### 4. Delete an Agent
DELETE is served by an older beta API and requires a different `anthropic-beta` header than the other endpoints. Use `agent-api-2026-03-01` **alone** — combining it with `managed-agents-2026-04-01` is rejected as incompatible.
```bash
curl -s -X DELETE "https://api.anthropic.com/v1/agents/<AGENT_ID>" \
-H "x-api-key: $ANTHROPIC_MANAGED_AGENTS_TOKEN" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: agent-api-2026-03-01"
```
### 5. Create an Environment
An environment defines the container configuration (network policy, packages) that sessions run in. Create once, reuse across sessions.
Write to `/tmp/env_create.json`:
```json
{
"name": "Default Cloud Environment",
"description": "Standard environment with unrestricted network access",
"config": {
"type": "cloud",
"networking": {
"type": "unrestricted"
},
"packages": {
"pip": ["requests", "pandas"],
"npm": ["typescript"]
}
}
}
```
Then run:
```bash
curl -s -X POST "https://api.anthropic.com/v1/environments" \
-H "x-api-key: $ANTHROPIC_MANAGED_AGENTS_TOKEN" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: managed-agents-2026-04-01" \
-H "Content-Type: application/json" \
-d @/tmp/env_create.json | jq '{id: .id, name: .name}'
```
Save the returned `id` (e.g., `env_011...`) for session creation.
**Network options:**
- `{"type": "unrestricted"}` — full internet access
- `{"type": "limited", "allow_package_managers": true, "allow_mcp_servers": true, "allowed_hosts": ["api.github.com"]}` — restricted outbound
### 6. Create a Session (Start a Task)
A session runs one task: it mounts resources (repos, files), runs the agent, and produces output. Each session is a separate container.
Write to `/tmp/session_create.json`:
```json
{
"agent": "agent_011CZk...",
"environment_id": "env_011...",
"title": "Review PR #42",
"resources": [
{
"type": "github_repository",
"url": "https://github.com/your-org/your-repo",
"authorization_token": "ghp_xxx",
"checkout": {
"type": "branch",
"name": "feature/your-branch"
}
}
]
}
```
Then run:
```bash
curl -s -X POST "https://api.anthropic.com/v1/sessions" \
-H "x-api-key: $ANTHROPIC_MANAGED_AGENTS_TOKEN" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: managed-agents-2026-04-01" \
-H "Content-Type: application/json" \
-d @/tmp/session_create.json | jq '{id: .id, status: .status}'
```
**Resource types:**
- `github_repository` — mounts a GitHub repo; requires `url`, `authorization_token` (GitHub PAT), and optional `checkout` (branch or commit SHA). Defaults to repo's default branch.
- `file` — mounts a file uploaded via the Files API; requires `file_id`.
**Checkout options:**
- `{"type": "branch", "name": "main"}`
- `{"type": "commit", "sha": "abc123..."}`
**With Vault secrets:**
```json
{
"agent": "agent_011CZk...",
"environment_id": "env_011...",
"resources": [...],
"vault_ids": ["vault_abc..."]
}
```
### 7. Stream Session Events
Stream real-time SSE events from a running session. The stream stays open until the session completes.
```bash
curl -s "https://api.anthropic.com/v1/sessions/<SESSION_ID>/events/stream" \
-H "x-api-key: $ANTHROPIC_MANAGED_AGENTS_TOKEN" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: managed-agents-2026-04-01" \
-H "Accept: text/event-stream"
```
Events are Server-Sent Events (SSE). Each event has a `type` field:
- `agent.message` — agent text output
- `agent.tool_use` — tool invocation (bash command, file read, etc.)
- `agent.tool_result` — tool output
- `agent.thinking` — extended thinking progress signal
- `agent.mcp_tool_use` — MCP tool invocation
- `agent.mcp_tool_result` — MCP tool output
Parse agent message text output only:
```bash
curl -s "https://api.anthropic.com/v1/sessions/<SESSION_ID>/events/stream" \
-H "x-api-key: $ANTHROPIC_MANAGED_AGENTS_TOKEN" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: managed-agents-2026-04-01" \
-H "Accept: text/event-stream" | grep '^data:' | python3 -c "
import sys, json
for line in sys.stdin:
line = line.strip()
if line.startswith('data: '):
try:
ev = json.loads(line[6:])
# agent.message events contain content blocks with text
if ev.get('type') == 'agent.message':
for block in ev.get('content', []):
if block.get('type') == 'text':
print(block.get('text', ''), end='', flush=True)
except:
pass
"
```
### 7b. Send Events to a Session (Follow-up Messages)
While a session is idle (waiting), send follow-up messages or tool results:
```bash
curl -s -X POST "https://api.anthropic.com/v1/sessions/<SESSION_ID>/events" \
-H "x-api-key: $ANTHROPIC_MANAGED_AGENTS_TOKEN" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: managed-agents-2026-04-01" \
-H "Content-Type: application/json" \
-d '{
"events": [
{
"type": "user.message",
"content": [{"type": "text", "text": "Now focus on the security implications."}]
}
]
}'
```
### 7c. List Past Events
Replay all events from a completed or running session:
```bash
curl -s "https://api.anthropic.com/v1/sessions/<SESSION_ID>/events" \
-H "x-api-key: $ANTHROPIC_MANAGED_AGENTS_TOKEN" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: managed-agents-2026-04-01" | jq '.data[] | {type: .type, id: .id}'
```
### 8. Get Session Status
```bash
curl -s "https://api.anthropic.com/v1/sessions/<SESSION_ID>" \
-H "x-api-key: $ANTHROPIC_MANAGED_AGENTS_TOKEN" \
-H "anthropic-version: 2023-06-01" \
-H "anthropic-beta: managed-agents-2026-04-01" | jq '{id: .id, status: .status, title: .title}'
```
**Session statuses:** `running`, `idle`, `terminated`
### 9. List Sessions
```bash
# List all sessions for an agent
curl -s "https://api.anthropic.com/v1/sessions?agent_id=<AGENT_ID>&limit=10" \
-Related in Backend & APIs
jfrog
IncludedInteract with the JFrog Platform via the JFrog CLI and REST/GraphQL APIs. Use this skill when the user wants to manage Artifactory repositories, upload or download artifacts, manage builds, configure permissions, manage users and groups, work with access tokens, configure JFrog CLI servers, search artifacts, manage properties, set up replication, manage JFrog Projects, run security audits or scans, look up CVE details, query exposures scan results from JFrog Advanced Security, manage release bundles and lifecycle operations, aggregate or export platform data, or perform any JFrog Platform administration task. Also use when the user mentions jf, jfrog, artifactory, xray, distribution, evidence, apptrust, onemodel, graphql, workers, mission control, curation, advanced security, exposures, or any JFrog product name.
cupynumeric-migration-readiness
IncludedPre-migration readiness assessor for porting NumPy to cuPyNumeric. Use BEFORE substantial porting work begins when the user asks whether code will scale on GPU, whether they should migrate to cuPyNumeric, which NumPy patterns transfer cleanly, what must be refactored before porting, or mentions pre-port assessment, scaling analysis, or refactor planning. Inspect the user's source code, look up NumPy usage, cross-reference the cuPyNumeric API support manifest, and distinguish distributed-scaling-friendly patterns from blockers such as unsupported APIs, scalar synchronization, host round-trips, Python/object-heavy control flow, shape/data-dependent branching, and in-place mutation hazards. Produce a verdict of READY, LIGHT REFACTOR, SIGNIFICANT REFACTOR, or NOT RECOMMENDED, with concrete refactor pointers.
alibabacloud-data-agent-skill
IncludedInvoke Alibaba Cloud Apsara Data Agent for Analytics via CLI to perform natural language-driven data analysis on enterprise databases. Data Agent for Analytics is an intelligent data analysis agent developed by Alibaba Cloud Database team for enterprise users. It automatically completes requirement analysis, data understanding, analysis insights, and report generation based on natural language descriptions. This tool supports: discovering data resources (instances/databases/tables) managed in DMS, initiating query or deep analysis sessions, real-time progress tracking, and retrieving analysis conclusions and generated reports. Use this Skill when users need to query databases, analyze data trends, generate data reports, ask questions in natural language, or mention "Data Agent", "data analysis", "database query", "SQL analysis", "data insights".
token-optimizer
IncludedReduce OpenClaw token usage and API costs through smart model routing, heartbeat optimization, budget tracking, and native 2026.2.15 features (session pruning, bootstrap size limits, cache TTL alignment). Use when token costs are high, API rate limits are being hit, or hosting multiple agents at scale. The 4 executable scripts (context_optimizer, model_router, heartbeat_optimizer, token_tracker) are local-only — no network requests, no subprocess calls, no system modifications. Reference files (PROVIDERS.md, config-patches.json) document optional multi-provider strategies that require external API keys and network access if you choose to use them. See SECURITY.md for full breakdown.
resend-cli
IncludedUse this skill when the task is specifically about operating Resend from an AI agent, terminal session, or CI job via the official resend CLI: installing/authenticating the CLI, sending/listing/updating/cancelling emails, batch sends, domains and DNS, webhooks and local listeners, inbound receiving, contacts, topics, segments, broadcasts, templates, API keys, profiles, or debugging Resend CLI/API failures. Trigger on mentions of Resend CLI, `resend`, `resend doctor`, `resend emails send`, `resend domains`, `resend webhooks listen`, `resend emails receiving`, or agent-friendly terminal automation.
alibabacloud-odps-maxframe-coding
IncludedUse this skill for MaxFrame SDK development and documentation navigation on Alibaba Cloud MaxCompute (ODPS). Helps answer MaxFrame API, concept, official example, and supported pandas API questions; create data processing programs; read/write MaxCompute tables; debug jobs (remote or local); and build custom DPE runtime images. Trigger when users mention MaxFrame, MaxCompute with MaxFrame, ODPS table processing, DPE runtime, MaxFrame docs/examples, DataFrame/Tensor operations, or GPU runtime setup. Works for both English and Chinese queries about Alibaba Cloud data processing with MaxFrame.