# Claude Agent SDK setup kit: install notes Checked 2026-10-22 against anthropics/claude-agent-sdk-python at commit 6b4a557e9f395934bd16e78b04e0f09833eb387e (v0.2.172) and the official Agent SDK docs. The TypeScript path was checked against @anthropic-ai/claude-agent-sdk 0.3.308. ## Requirements - Python 3.10 or later (package metadata), or Node.js 18 or later (npm engines field). You need only one. - An Anthropic API key from the Claude Console, or a supported cloud provider (see below). - Billing: every run uses tokens. Check Anthropic's pricing page before leaving anything running. ## Python ```bash mkdir claude-agent-first && cd claude-agent-first python3 -m venv .venv source .venv/bin/activate pip install -r requirements.txt # claude-agent-sdk==0.2.172 export ANTHROPIC_API_KEY=... # set it in this shell; never in the file python agent.py ``` The wheel bundles the Claude Code CLI (2.1.308 for this release), so no separate install is needed on platforms with a prebuilt wheel. If pip falls back to the source distribution (Anthropic's example is ARM64 Windows), install Claude Code natively or set `cli_path`. ## TypeScript ```bash npm install # uses package.json in this kit export ANTHROPIC_API_KEY=... npx tsx agent.ts ``` npm 7 or later installs the SDK's peer dependencies (@anthropic-ai/sdk, @modelcontextprotocol/sdk) automatically. Do not install with `--omit=optional`: the bundled Claude Code binary arrives through optional dependencies. ## Keys and providers The SDK reads `ANTHROPIC_API_KEY` from the process environment. It does not load `.env` files. If you keep one, load it yourself and add `.env` to `.gitignore`. Cloud providers are selected with environment variables plus that cloud's credentials: `CLAUDE_CODE_USE_BEDROCK=1`, `CLAUDE_CODE_USE_ANTHROPIC_AWS=1` with `ANTHROPIC_AWS_WORKSPACE_ID`, `CLAUDE_CODE_USE_VERTEX=1`, or `CLAUDE_CODE_USE_FOUNDRY=1`. Anthropic does not allow third-party developers to offer claude.ai login or rate limits in products built on the SDK unless previously approved. This kit uses an API key.