Quick Start
Set your API key
Configure your Anthropic API key as a secret:
Secrets are encrypted at rest and injected at the network level. The agent never sees them in logs or LLM context.
Configuration Options
The Claude Agent SDK supports various configuration options viaClaudeAgentOptions:
Model Selection
sonnet- Claude 3.5 Sonnet (recommended)opus- Claude 3 Opus (most capable)haiku- Claude 3 Haiku (fastest)
Permission Modes
bypassPermissions- Tools execute automatically without confirmationrequestPermissions- Prompt user before executing tools
Adding Tools
The Claude Agent SDK supports function calling for tools. Here’s an example with a custom tool:agent.py
Deployment Configuration
Create asuperserve.yaml file for advanced deployment options:
superserve.yaml
Dependencies
If your agent uses additional Python packages, create arequirements.txt:
requirements.txt
pyproject.toml for more complex projects:
pyproject.toml
Session Persistence
The/workspace directory persists across turns and restarts:
agent.py
Troubleshooting
Import error: No module named 'claude_agent_sdk'
Import error: No module named 'claude_agent_sdk'
Make sure you have a
requirements.txt or pyproject.toml with claude-agent-sdk listed. Redeploy your agent:API key not found
API key not found
Set your Anthropic API key as a secret:
Agent not responding
Agent not responding
Check the agent logs:
Next Steps
Core Concepts
Learn about isolation, persistence, and credentials
CLI Reference
Explore deployment options and CLI commands
Secrets Management
Manage API keys and environment variables
Session Management
Work with persistent sessions