GitHub - anthropics/claude-agent-sdk-python
Claude Agent SDK for Python
Python SDK for Claude Agent. See the Claude Agent SDK documentation for more information.
Installation
pip install claude-agent-sdk
Prerequisites:
Python 3.10+
Node.js
Claude Code: npm install -g @anthropic-ai/claude-code
Quick Start
import anyio
from claude_agent_sdk import query
async def main():
async for message in query(prompt="What is 2 + 2?"):
print(message)
anyio.run(main)
Basic Usage: query()
query() is an async function for querying Claude Code. It returns a...
Read more at github.com