conduit-agent-sdk
General-purpose Python SDK for the Agent Client Protocol (ACP). Works with any ACP-compatible coding agent — Claude Code, Gemini CLI, OpenCode, Codex, Goose, and more.
Architecture
┌─────────────────────────────────────────┐
│ Python (conduit_sdk) │ ← Developer-facing API
│ Client, Session, @tool, hooks, proxy │
├─────────────────────────────────────────┤
│ Rust (_conduit_sdk via PyO3) │ ← Performance-critical core
│ ACP client, transport, serialization │
├─────────────────────────────────────────┤
│ sacp / sacp-tokio │ ← ACP protocol implementation
│ JrHandlerChain, ByteStreams, types │
└─────────────────────────────────────────┘
Installation
Requires Python 3.12+ and Rust toolchain.
# Clone and install in development mode
git clone <repo-url>
cd conduit-agent-sdk
uv sync
maturin develop --uv
Quick Start
One-liner with query()
import asyncio
from conduit_sdk import query
async def main():
async for message in query(prompt="Hello!", agent="claude-acp"):
print(message.text())
asyncio.run(main())
Registry-based client
from conduit_sdk import Client
async with await Client.from_registry("claude-acp") as client:
async for message in client.prompt("Hello!"):
print(message.text())
Manual command (no registry)
from conduit_sdk import Client
async with Client(["claude", "--agent"]) as client:
async for message in client.prompt("Hello!"):
print(message.text())
Agent Registry
The SDK integrates with the ACP agent registry, which provides a catalog of available agents with distribution metadata.
from conduit_sdk import Registry
registry = Registry()
await registry.fetch()
# List all agents
agents = await registry.list_agents()
# Search by keyword
results = registry.search("claude")
# Resolve to a shell command
cmd, env = await registry.resolve_command("claude-acp")
# cmd = ["npx", "@zed-industries/claude-agent-acp@0.18.0"]
Resolution automatically detects your platform and preferred runtime (npx → uvx → binary).
Features
Custom Tools
from conduit_sdk import tool
@tool(description="Read a file from disk")
async def read_file(path: str) -> str:
return open(path).read()
Lifecycle Hooks
from conduit_sdk import HookType
@client.hooks.on(HookType.PreToolUse)
async def log_tool(ctx):
print(f"Tool called: {ctx.get('tool_name')}")
return ctx
Proxy Chains
from conduit_sdk import ProxyChain, ContextInjector
chain = ProxyChain()
chain.add(ContextInjector(context="Be concise."))
await chain.build()
Sessions
session = await client.new_session()
await session.set_mode("code")
response = await session.prompt("Fix the bug in main.py")
Examples
Run any example with uv run:
uv run examples/01_hello_world.py
| # | File | What it demonstrates |
|---|---|---|
| 01 | 01_hello_world.py |
Simplest query() call |
| 02 | 02_registry_browse.py |
Fetch registry, list agents, search |
| 03 | 03_streaming.py |
Client.from_registry() + streaming |
| 04 | 04_multi_agent.py |
Connect to different agents |
| 05 | 05_permissions.py |
Custom can_use_tool callback |
| 06 | 06_custom_tools.py |
@tool decorator + MCP server |
| 07 | 07_file_operations.py |
Agent reads/lists/summarizes files |
| 08 | 08_code_generation.py |
Agent writes a Python module |
| 09 | 09_multi_turn.py |
Multi-turn sessions, mode/model changes |
| 10 | 10_hooks.py |
PreToolUse/PostToolUse hooks |
| 11 | 11_proxy_chain.py |
ContextInjector + ResponseFilter |
| 12 | 12_parallel_agents.py |
asyncio.gather() multiple agents |
API Overview
| Module | Purpose |
|---|---|
conduit_sdk.query |
One-shot registry-based agent query |
conduit_sdk.Client |
Connect to agents, send prompts, stream responses |
conduit_sdk.Registry |
Fetch and query the ACP agent registry |
conduit_sdk.Session |
Manage conversation sessions |
conduit_sdk.tool |
Register Python functions as agent tools |
conduit_sdk.HookRunner |
Lifecycle hook system |
conduit_sdk.ProxyChain |
Compose message-intercepting proxies |
Development
# Install dev dependencies
uv sync --extra dev
# Build Rust extension
maturin develop --uv
# Run tests
uv run pytest tests/ -v
# Lint
uv run ruff check python/ tests/
Status
This SDK is in early development. The current implementation provides:
- Complete project scaffold with Rust/Python hybrid architecture
- ACP agent registry integration with automatic command resolution
- Stub implementations for all ACP operations (connect, prompt, session, tools, hooks, proxy)
- Full type coverage with PEP 561 type stubs
- 12 runnable examples demonstrating the full SDK surface
- Test suite covering Python-layer logic
The Rust core has TODO markers where sacp crate integration needs to be wired up for actual ACP protocol communication.
License
MIT
Metadata
Release files for conduit-agent-sdk 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| conduit_agent_sdk-0.1.0.tar.gz | 96.4 kB | With provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| conduit_agent_sdk-0.1.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | PyPy 3.10 | PyPy 3.10 7.3 | Linux glibc 2.17+ ARM64 | Details |
| conduit_agent_sdk-0.1.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | PyPy 3.9 | PyPy 3.9 7.3 | Linux glibc 2.17+ ARM64 | Details |
| conduit_agent_sdk-0.1.0-cp312-abi3-win_amd64.whl | CPython 3.12 | abi3 | Windows x86-64 | Details |
| conduit_agent_sdk-0.1.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.12 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| conduit_agent_sdk-0.1.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.12 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| conduit_agent_sdk-0.1.0-cp312-abi3-macosx_11_0_arm64.whl | CPython 3.12 | abi3 | macOS 11.0+ ARM64 | Details |
Total release size: 11.6 MB
Release files / conduit_agent_sdk-0.1.0.tar.gz
| Download URL | conduit_agent_sdk-0.1.0.tar.gz |
|---|---|
| Size | 96.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8e856cbf97aadf036ab955d8c43965e00ef924773a530a63220eb0e906555e7a
|
|
BLAKE2b-256 checksum How to use checksums |
426b72cb13f34d1caa742e1d8956249fc67cb8f8dc0bd0724184789542bbca3d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 24, 2026.
Transparency logRelease files / conduit_agent_sdk-0.1.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | conduit_agent_sdk-0.1.0-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | Linux glibc 2.17+ ARM64 PyPy 3.10 PyPy 3.10 7.3 |
|
SHA-256 checksum How to use checksums |
f3bacc370a3d90751d6a38239908324f9fcf1c6a8fb9ac0cef2c7105603dd357
|
|
BLAKE2b-256 checksum How to use checksums |
c75006537440d4a9f65f8f0681d3bb7d1f5c5457aae836743b9131027c159e20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 24, 2026.
Transparency logRelease files / conduit_agent_sdk-0.1.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | conduit_agent_sdk-0.1.0-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | Linux glibc 2.17+ ARM64 PyPy 3.9 PyPy 3.9 7.3 |
|
SHA-256 checksum How to use checksums |
3b34c969e7ab0bdbe28ea616baffe648c310586ca70b0fca2fe19d601860c7d0
|
|
BLAKE2b-256 checksum How to use checksums |
82f37bd6ce300d24f608e27a3d0d9c55d59ddb69f7d71c3279d501af7a136a1c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 24, 2026.
Transparency logRelease files / conduit_agent_sdk-0.1.0-cp312-abi3-win_amd64.whl
| Download URL | conduit_agent_sdk-0.1.0-cp312-abi3-win_amd64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.12 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
0edbb7ad95e42befb2ebeb7d37982e0c2039a661a91695a0a0ba8b448176fb97
|
|
BLAKE2b-256 checksum How to use checksums |
9f539d748357ca1af499ebdbf26aa2fef9e0008b203731a99a2088bc7707f990
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 24, 2026.
Transparency logRelease files / conduit_agent_sdk-0.1.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | conduit_agent_sdk-0.1.0-cp312-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
5eeb82adcc7c222169d3bd2bde1e4a9ac2f9b1d34cababc81e099a669035bc87
|
|
BLAKE2b-256 checksum How to use checksums |
575bb1b066cf6aaca310143d9d0a571dc71576f55ac96f5ff77a8c094e8d5cdf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 24, 2026.
Transparency logRelease files / conduit_agent_sdk-0.1.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | conduit_agent_sdk-0.1.0-cp312-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
87073096b7b02a1dc20e392568944699645b8b9ee5653d307b2b7e412acd2ca1
|
|
BLAKE2b-256 checksum How to use checksums |
2b5b0e09d8ac20045418e67ddeed47a3949a0ab24ea6f9507ff17683746e5e20
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 24, 2026.
Transparency logRelease files / conduit_agent_sdk-0.1.0-cp312-abi3-macosx_11_0_arm64.whl
| Download URL | conduit_agent_sdk-0.1.0-cp312-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.8 MB |
| Tags | CPython 3.12 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
f6a0ea019c289953bbf704d6710f5f48bd7c1e129888d1dafb16e1fe68af1cd4
|
|
BLAKE2b-256 checksum How to use checksums |
93c31bfa7a4280447ef56850317fdd3f3690a05766e629c89d58e39d709b7196
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 24, 2026.
Transparency logSecurity for conduit-agent-sdk 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 7 files in this release have been uploaded with provenance metadata.
Attestation for conduit_agent_sdk-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Feb 24, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.