{"id":31841558,"url":"https://github.com/psiace/agent-client-protocol-python","last_synced_at":"2025-10-12T05:21:01.586Z","repository":{"id":313482192,"uuid":"1051445009","full_name":"PsiACE/agent-client-protocol-python","owner":"PsiACE","description":"A Python implement of Agent Client Protocol (ACP, https://agentclientprotocol.com, by Zed Industries)","archived":false,"fork":false,"pushed_at":"2025-10-10T21:25:39.000Z","size":1009,"stargazers_count":16,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-11T11:51:56.964Z","etag":null,"topics":["acp","agent-client-protocol","ai","llm","python","zed"],"latest_commit_sha":null,"homepage":"https://psiace.github.io/agent-client-protocol-python/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PsiACE.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-06T02:34:49.000Z","updated_at":"2025-10-09T20:45:39.000Z","dependencies_parsed_at":"2025-09-06T11:40:27.508Z","dependency_job_id":"0ea70ead-dcaa-4e06-8837-54a3540645dc","html_url":"https://github.com/PsiACE/agent-client-protocol-python","commit_stats":null,"previous_names":["psiace/agent-client-protocol-python"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/PsiACE/agent-client-protocol-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PsiACE%2Fagent-client-protocol-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PsiACE%2Fagent-client-protocol-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PsiACE%2Fagent-client-protocol-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PsiACE%2Fagent-client-protocol-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PsiACE","download_url":"https://codeload.github.com/PsiACE/agent-client-protocol-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PsiACE%2Fagent-client-protocol-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010341,"owners_count":26084738,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["acp","agent-client-protocol","ai","llm","python","zed"],"created_at":"2025-10-12T05:20:57.239Z","updated_at":"2025-10-12T05:21:01.577Z","avatar_url":"https://github.com/PsiACE.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Agent Client Protocol (Python)\n\nPython SDK for the Agent Client Protocol (ACP). Build agents that speak ACP over stdio so tools like Zed can orchestrate them.\n\n\u003e Each release tracks the matching ACP schema version. Contributions that improve coverage or tooling are very welcome.\n\n**Highlights**\n\n- Typed dataclasses generated from the upstream ACP schema (`acp.schema`)\n- Async agent base class plus stdio transport helpers for quick bootstrapping\n- Included examples that stream content updates and tool calls end-to-end\n\n## Install\n\n```bash\npip install agent-client-protocol\n# or with uv\nuv add agent-client-protocol\n```\n\n## Quickstart\n\n1. Install the package and point your ACP-capable client at the provided echo agent:\n   ```bash\n   pip install agent-client-protocol\n   python examples/echo_agent.py\n   ```\n2. Wire it into your client (e.g. Zed → Agents panel) so stdio is connected; the SDK handles JSON-RPC framing and lifecycle messages.\n\nPrefer a step-by-step walkthrough? Read the [Quickstart guide](docs/quickstart.md) or the hosted docs: https://psiace.github.io/agent-client-protocol-python/.\n\n### Minimal agent sketch\n\n```python\nimport asyncio\n\nfrom acp import Agent, AgentSideConnection, PromptRequest, PromptResponse, SessionNotification, stdio_streams\nfrom acp.schema import AgentMessageChunk, TextContentBlock\n\n\nclass EchoAgent(Agent):\n    def __init__(self, conn):\n        self._conn = conn\n\n    async def prompt(self, params: PromptRequest) -\u003e PromptResponse:\n        for block in params.prompt:\n            text = getattr(block, \"text\", \"\")\n            await self._conn.sessionUpdate(\n                SessionNotification(\n                    sessionId=params.sessionId,\n                    update=AgentMessageChunk(\n                        sessionUpdate=\"agent_message_chunk\",\n                        content=TextContentBlock(type=\"text\", text=text),\n                    ),\n                )\n            )\n        return PromptResponse(stopReason=\"end_turn\")\n\n\nasync def main() -\u003e None:\n    reader, writer = await stdio_streams()\n    AgentSideConnection(lambda conn: EchoAgent(conn), writer, reader)\n    await asyncio.Event().wait()\n\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\nFull example with streaming and lifecycle hooks lives in [examples/echo_agent.py](examples/echo_agent.py).\n\n## Examples\n\n- `examples/mini_swe_agent`: bridges mini-swe-agent into ACP, including a duet launcher and Textual TUI client\n- Additional transport helpers are documented in the [Mini SWE guide](docs/mini-swe-agent.md)\n\n## Documentation\n\n- Project docs (MkDocs): https://psiace.github.io/agent-client-protocol-python/\n- Local sources: `docs/`\n  - [Quickstart](docs/quickstart.md)\n  - [Mini SWE Agent bridge](docs/mini-swe-agent.md)\n\n## Development workflow\n\n```bash\nmake install                     # create uv virtualenv and install hooks\nACP_SCHEMA_VERSION=\u003cref\u003e make gen-all  # refresh generated schema bindings\nmake check                       # lint, types, dependency analysis\nmake test                        # run pytest + doctests\n```\n\nAfter local changes, consider updating docs/examples if the public API surface shifts.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsiace%2Fagent-client-protocol-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpsiace%2Fagent-client-protocol-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpsiace%2Fagent-client-protocol-python/lists"}