Claude Code & Agent SDK
One framework. Three surfaces.
Claude Code CLI for interactive work. Claude Agent SDK for production pipelines. Managed Agents for fully hosted sandboxes. The same tools, memory, and subagent system across all three.
Three surfaces
Built-in tools
| Tool | What it does | When agents use it |
|---|---|---|
| Read | Read files, directories, and context | Understanding codebase, ingesting documents |
| Write | Create new files | Generating reports, scaffolding new modules |
| Edit | Surgical edits to existing files | Bug fixes, config changes, refactoring |
| Bash | Execute shell commands | Running tests, builds, deployments, scripts |
| Glob · Grep | File pattern matching and content search | Finding relevant files across large repos |
| WebSearch · WebFetch | Live web search and page retrieval | Research, checking API docs, current prices |
| Agent | Spawn a subagent with its own tools and prompt | Parallel work, role-separated agent teams |
| MCP servers | Any tool via Model Context Protocol | Databases, Slack, Jira, Playwright, custom APIs |
Pricing
| Plan | Monthly | Claude Code access |
|---|---|---|
| Pro | $20 | Included — shared pool with chat |
| Max 5× | $100 | 5× usage limit |
| Max 20× | $200 | 20× usage limit |
| Team Premium | $100/seat | Required for Claude Code; 5-seat minimum, billed annually |
| Enterprise | Custom | All surfaces + SSO + audit logs; tokens billed separately |
| API (PAYG) | $1–$25/M | Full cost visibility; no monthly floor; Bedrock/Vertex available |
When to use
Interactive exploration — pair-programming, debugging, cross-file analysis
Use Claude Code CLI — run it in the terminal, VS Code, JetBrains, or claude.ai/code. Ask it to trace logic across a codebase, reproduce a bug and iterate on a fix, or review a regulation document. Sessions persist via CLAUDE.md; the agent reads your project’s conventions at startup and remembers them across sessions.
Production pipelines — CI/CD bots, automated analysis, custom applications
Use the Agent SDK — the query() async generator streams agent messages programmatically. Define subagents with their own tool sets (read-only discovery agents + write-owning parent agent = separation of duties). Use PreToolUse/PostToolUse hooks to log every action for audit trails. Deploy on Bedrock or Vertex for data residency requirements.
Rapid prototyping with no infrastructure to manage
Use Managed Agents — Anthropic hosts the sandbox; call the REST API and get results back. No environment setup, no binary management. Trade-off: not HIPAA BAA eligible and not Zero Data Retention eligible. For regulated data (maritime ISM records, crew data), use the self-hosted Agent SDK on Bedrock or Vertex instead.
Multi-agent orchestration — virtual teams running business operations
Use the Agent SDK with subagents — the agents option accepts an array of AgentDefinition objects, each with its own model, prompt, tool set, effort level, and permission mode. The parent invokes them via the Agent tool. Pattern: discovery/verification subagents get read-only tools; the parent owns all writes. Subagent messages carry parent_tool_use_id for full traceability.
Permission modes
| Mode | Behaviour |
|---|---|
| default | Asks before any file write or command execution |
| plan | Read-only — the agent can explore but never write. Safe for discovery subagents |
| acceptEdits | Auto-approves file edits; still asks for shell commands |
| auto | Model classifier decides what to approve automatically |
| bypassPermissions | No prompts — agent acts autonomously. Use only in fully isolated environments |