Embed Bounded Claude Code Sessions Into Python Automation With The Claude Agent Sdk
ASecurity
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.
36 stars
0 votes
0 copies
1 view
Added June 8, 2026
ai-agentspythongobashgitsecuritydocumentation
Works with
claude code
cli
Security analysis
A92/100
mediumInstalls packages at runtime which could introduce malicious dependencies
Installs into .claude/skills of the current project.
Are you the author of Embed Bounded Claude Code Sessions Into Python Automation With The Claude Agent Sdk?
Add the live security badge to your README. It updates with every re-scan.
[](https://www.skillsdirectory.com/skills/agentskillexchange-embed-bounded-claude-code-sessions-into-python-aut)
---
name: "Embed bounded Claude Code sessions into Python automation with the Claude Agent SDK"
slug: "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."
github_stars: 6390
verification: "security_reviewed"
source: "https://github.com/anthropics/claude-agent-sdk-python"
author: "Anthropic"
publisher_type: "organization"
category: "Developer Tools"
framework: "Claude Code"
tool_ecosystem:
github_repo: "anthropics/claude-agent-sdk-python"
github_stars: 6390
npm_package: "claude-agent-sdk"
---
# Embed bounded Claude Code sessions into Python automation with the Claude Agent SDK
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.
## Prerequisites
Python 3.10+, pip, Claude Agent SDK package, Claude Code compatible credentials
## Installation
Use the upstream install or setup path that matches your environment:
- pip install claude-agent-sdk
- pip install build twine
Requirements and caveats from upstream:
- # Claude Agent SDK for Python
- Python SDK for Claude Agent. See the [Claude Agent SDK documentation](https://platform.claude.com/docs/en/agent-sdk/python) for more information.
- **Prerequisites:**
Basic usage or getting-started notes:
- bash
- **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...
- Specify a custom path: ClaudeAgentOptions(cli_path="/path/to/claude")
- Source: https://github.com/anthropics/claude-agent-sdk-python
- Extracted from upstream docs: https://raw.githubusercontent.com/anthropics/claude-agent-sdk-python/HEAD/README.md
## Documentation
- https://github.com/anthropics/claude-agent-sdk-python
## Source
- [Agent Skill Exchange](https://agentskillexchange.com/skills/embed-bounded-claude-code-sessions-into-python-automation-with-the-claude-agent-sdk/)