{"id":"27b2f0dc-2a6d-4bdf-92ff-06aded93b1ad","shortId":"RFQJZg","kind":"skill","title":"Embed bounded Claude Code sessions into Python automation with the Claude Agent SDK","tagline":"Use the Claude Agent SDK for Python when an existing script or service needs to delegate scoped repo work to Claude Code and consume structured responses programmatically.","description":"# Embed bounded Claude Code sessions into Python automation with the Claude Agent SDK\n\nUse the Claude Agent SDK for Python when an existing script or service needs to delegate scoped repo work to Claude Code and consume structured responses programmatically.\n\n## Prerequisites\n\nPython 3.10+, pip, Claude Agent SDK package, Claude Code compatible credentials\n\n## Installation\n\nUse the upstream install or setup path that matches your environment:\n- pip install claude-agent-sdk\n- pip install build twine\n\nRequirements and caveats from upstream:\n- # Claude Agent SDK for Python\n- Python SDK for Claude Agent. See the [Claude Agent SDK documentation](https://platform.claude.com/docs/en/agent-sdk/python) for more information.\n- **Prerequisites:**\n\nBasic usage or getting-started notes:\n- bash\n- **Note:** The Claude Code CLI is automatically bundled with the package - no separate installation required! The SDK will use the bundled CLI by default. If you prefer to use a system-wide installation or a specific v...\n- Specify a custom path: ClaudeAgentOptions(cli_path=\"/path/to/claude\")\n\n- Source: https://github.com/anthropics/claude-agent-sdk-python\n- Extracted from upstream docs: https://raw.githubusercontent.com/anthropics/claude-agent-sdk-python/HEAD/README.md\n\n## Documentation\n\n- https://github.com/anthropics/claude-agent-sdk-python\n\n## Source\n\n- [Agent Skill Exchange](https://agentskillexchange.com/skills/embed-bounded-claude-code-sessions-into-python-automation-with-the-claude-agent-sdk/)","tags":["embed","bounded","claude","code","sessions","into","python","automation","with","the","agent","sdk"],"capabilities":["skill","source-agentskillexchange","skill-embed-bounded-claude-code-sessions-into-python-automation-with-the-claude-agent-sdk","topic-agent-skills","topic-ai-agents","topic-ai-tools","topic-awesome-list","topic-claude-code","topic-codex","topic-cursor","topic-llm","topic-mcp","topic-npx-skills","topic-openclaw","topic-skills-catalog"],"categories":["skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/agentskillexchange/skills/embed-bounded-claude-code-sessions-into-python-automation-with-the-claude-agent-sdk","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add agentskillexchange/skills","source_repo":"https://github.com/agentskillexchange/skills","install_from":"skills.sh"}},"qualityScore":"0.454","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 8 github stars · SKILL.md body (1,502 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:10:18.977Z","embedding":null,"createdAt":"2026-05-18T13:16:21.317Z","updatedAt":"2026-05-18T19:10:18.977Z","lastSeenAt":"2026-05-18T19:10:18.977Z","tsv":"'/anthropics/claude-agent-sdk-python':200,211 '/anthropics/claude-agent-sdk-python/head/readme.md':207 '/docs/en/agent-sdk/python)':138 '/path/to/claude':196 '/skills/embed-bounded-claude-code-sessions-into-python-automation-with-the-claude-agent-sdk/)':218 '3.10':83 'agent':12,17,52,57,86,109,121,129,133,213 'agentskillexchange.com':217 'agentskillexchange.com/skills/embed-bounded-claude-code-sessions-into-python-automation-with-the-claude-agent-sdk/)':216 'autom':8,48 'automat':157 'bash':150 'basic':143 'bound':2,42 'build':113 'bundl':158,171 'caveat':117 'claud':3,11,16,34,43,51,56,74,85,89,108,120,128,132,153 'claude-agent-sdk':107 'claudeagentopt':193 'cli':155,172,194 'code':4,35,44,75,90,154 'compat':91 'consum':37,77 'credenti':92 'custom':191 'default':174 'deleg':29,69 'doc':204 'document':135,208 'emb':1,41 'environ':104 'exchang':215 'exist':23,63 'extract':201 'get':147 'getting-start':146 'github.com':199,210 'github.com/anthropics/claude-agent-sdk-python':198,209 'inform':141 'instal':93,97,106,112,164,184 'match':102 'need':27,67 'note':149,151 'packag':88,161 'path':100,192,195 'pip':84,105,111 'platform.claude.com':137 'platform.claude.com/docs/en/agent-sdk/python)':136 'prefer':177 'prerequisit':81,142 'programmat':40,80 'python':7,20,47,60,82,124,125 'raw.githubusercontent.com':206 'raw.githubusercontent.com/anthropics/claude-agent-sdk-python/head/readme.md':205 'repo':31,71 'requir':115,165 'respons':39,79 'scope':30,70 'script':24,64 'sdk':13,18,53,58,87,110,122,126,134,167 'see':130 'separ':163 'servic':26,66 'session':5,45 'setup':99 'skill':214 'skill-embed-bounded-claude-code-sessions-into-python-automation-with-the-claude-agent-sdk' 'sourc':197,212 'source-agentskillexchange' 'specif':187 'specifi':189 'start':148 'structur':38,78 'system':182 'system-wid':181 'topic-agent-skills' 'topic-ai-agents' 'topic-ai-tools' 'topic-awesome-list' 'topic-claude-code' 'topic-codex' 'topic-cursor' 'topic-llm' 'topic-mcp' 'topic-npx-skills' 'topic-openclaw' 'topic-skills-catalog' 'twine':114 'upstream':96,119,203 'usag':144 'use':14,54,94,169,179 'v':188 'wide':183 'work':32,72","prices":[{"id":"b240900a-7bbf-42f3-914a-801a7f445a68","listingId":"27b2f0dc-2a6d-4bdf-92ff-06aded93b1ad","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"agentskillexchange","category":"skills","install_from":"skills.sh"},"createdAt":"2026-05-18T13:16:21.317Z"}],"sources":[{"listingId":"27b2f0dc-2a6d-4bdf-92ff-06aded93b1ad","source":"github","sourceId":"agentskillexchange/skills/embed-bounded-claude-code-sessions-into-python-automation-with-the-claude-agent-sdk","sourceUrl":"https://github.com/agentskillexchange/skills/tree/main/skills/embed-bounded-claude-code-sessions-into-python-automation-with-the-claude-agent-sdk","isPrimary":false,"firstSeenAt":"2026-05-18T13:16:21.317Z","lastSeenAt":"2026-05-18T19:10:18.977Z"}],"details":{"listingId":"27b2f0dc-2a6d-4bdf-92ff-06aded93b1ad","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"agentskillexchange","slug":"embed-bounded-claude-code-sessions-into-python-automation-with-the-claude-agent-sdk","github":{"repo":"agentskillexchange/skills","stars":8,"topics":["agent-skills","ai-agents","ai-tools","awesome-list","claude-code","codex","cursor","llm","mcp","npx-skills","openclaw","skills-catalog"],"license":"mit","html_url":"https://github.com/agentskillexchange/skills","pushed_at":"2026-05-18T19:02:17Z","description":"The open catalog of AI agent skills — 2,000+ security-scanned skills for Claude Code, Cursor, Codex, and more.","skill_md_sha":"32a0bce866faa94647a097ddd3949937eee361b7","skill_md_path":"skills/embed-bounded-claude-code-sessions-into-python-automation-with-the-claude-agent-sdk/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/agentskillexchange/skills/tree/main/skills/embed-bounded-claude-code-sessions-into-python-automation-with-the-claude-agent-sdk"},"layout":"multi","source":"github","category":"skills","frontmatter":{"name":"Embed bounded Claude Code sessions into Python automation with the Claude Agent SDK","description":"Use the Claude Agent SDK for Python when an existing script or service needs to delegate scoped repo work to Claude Code and consume structured responses programmatically."},"skills_sh_url":"https://skills.sh/agentskillexchange/skills/embed-bounded-claude-code-sessions-into-python-automation-with-the-claude-agent-sdk"},"updatedAt":"2026-05-18T19:10:18.977Z"}}