|
1 | | -# agent-client-protocol-python |
| 1 | +# Agent Client Protocol - Python SDK |
2 | 2 |
|
3 | | -[](https://img.shields.io/github/v/release/psiace/agent-client-protocol-python) |
4 | | -[](https://github.com/psiace/agent-client-protocol-python/actions/workflows/main.yml?query=branch%3Amain) |
5 | | -[](https://codecov.io/gh/psiace/agent-client-protocol-python) |
6 | | -[](https://img.shields.io/github/commit-activity/m/psiace/agent-client-protocol-python) |
7 | | -[](https://img.shields.io/github/license/psiace/agent-client-protocol-python) |
| 3 | +A Python implementation of the Agent Client Protocol (ACP) used by editors like Zed to talk to external agents over stdio. |
8 | 4 |
|
9 | | -A Python implement of Agent Client Protocol (ACP, by Zed Industries) |
| 5 | +- Repository: https://github.com/psiace/agent-client-protocol-python |
| 6 | +- Docs: https://psiace.github.io/agent-client-protocol-python/ |
10 | 7 |
|
11 | | -- **Github repository**: <https://github.com/psiace/agent-client-protocol-python/> |
12 | | -- **Documentation** <https://psiace.github.io/agent-client-protocol-python/> |
| 8 | +## What this provides |
13 | 9 |
|
14 | | -## Getting started with your project |
| 10 | +- Typed ACP client/agent primitives (`acp` package under `src/`) |
| 11 | +- A runnable example: a bridge that wraps mini-swe-agent as an ACP agent |
| 12 | +- Reference implementations under `reference/` for learning and comparison |
15 | 13 |
|
16 | | -### 1. Create a New Repository |
| 14 | +## Quick start |
17 | 15 |
|
18 | | -First, create a repository on GitHub with the same name as this project, and then run the following commands: |
19 | | - |
20 | | -```bash |
21 | | -git init -b main |
22 | | -git add . |
23 | | -git commit -m "init commit" |
24 | | -git remote add origin git@github.com:psiace/agent-client-protocol-python.git |
25 | | -git push -u origin main |
26 | | -``` |
27 | | - |
28 | | -### 2. Set Up Your Development Environment |
29 | | - |
30 | | -Then, install the environment and the pre-commit hooks with |
| 16 | +Install the development environment: |
31 | 17 |
|
32 | 18 | ```bash |
33 | 19 | make install |
34 | 20 | ``` |
35 | 21 |
|
36 | | -This will also generate your `uv.lock` file |
37 | | - |
38 | | -### 3. Run the pre-commit hooks |
39 | | - |
40 | | -Initially, the CI/CD pipeline might be failing due to formatting issues. To resolve those run: |
| 22 | +Run quality checks: |
41 | 23 |
|
42 | 24 | ```bash |
43 | | -uv run pre-commit run -a |
| 25 | +make check |
44 | 26 | ``` |
45 | 27 |
|
46 | | -### 4. Commit the changes |
47 | | - |
48 | | -Lastly, commit the changes made by the two steps above to your repository. |
| 28 | +Run tests: |
49 | 29 |
|
50 | 30 | ```bash |
51 | | -git add . |
52 | | -git commit -m 'Fix formatting issues' |
53 | | -git push origin main |
| 31 | +make test |
54 | 32 | ``` |
55 | 33 |
|
56 | | -You are now ready to start development on your project! |
57 | | -The CI/CD pipeline will be triggered when you open a pull request, merge to main, or when you create a new release. |
| 34 | +## Example: Mini SWE Agent bridge |
| 35 | + |
| 36 | +A minimal ACP bridge for mini-swe-agent is provided under [`examples/mini_swe_agent`](file:///Users/psiace/OSS/agent-client-protocol-python/examples/mini_swe_agent/README.md). It shows how to: |
58 | 37 |
|
59 | | -To finalize the set-up for publishing to PyPI, see [here](https://fpgmaas.github.io/cookiecutter-uv/features/publishing/#set-up-for-pypi). |
60 | | -For activating the automatic documentation with MkDocs, see [here](https://fpgmaas.github.io/cookiecutter-uv/features/mkdocs/#enabling-the-documentation-on-github). |
61 | | -To enable the code coverage reports, see [here](https://fpgmaas.github.io/cookiecutter-uv/features/codecov/). |
| 38 | +- Parse a prompt from ACP content blocks |
| 39 | +- Stream agent output to the client with `session/update` |
| 40 | +- Map command execution to `tool_call` and `tool_call_update` |
62 | 41 |
|
63 | | -## Releasing a new version |
| 42 | +See the example’s README or the docs quickstart for Zed configuration. |
64 | 43 |
|
65 | | -- Create an API Token on [PyPI](https://pypi.org/). |
66 | | -- Add the API Token to your projects secrets with the name `PYPI_TOKEN` by visiting [this page](https://github.com/psiace/agent-client-protocol-python/settings/secrets/actions/new). |
67 | | -- Create a [new release](https://github.com/psiace/agent-client-protocol-python/releases/new) on Github. |
68 | | -- Create a new tag in the form `*.*.*`. |
| 44 | +## Documentation |
69 | 45 |
|
70 | | -For more details, see [here](https://fpgmaas.github.io/cookiecutter-uv/features/cicd/#how-to-trigger-a-release). |
| 46 | +- Getting started: [docs/index.md](docs/index.md) |
| 47 | +- Quickstart: [docs/quickstart.md](docs/quickstart.md) |
| 48 | +- Mini SWE Agent example details: [docs/mini-swe-agent.md](docs/mini-swe-agent.md) |
71 | 49 |
|
72 | | ---- |
| 50 | +## Notes |
73 | 51 |
|
74 | | -Repository initiated with [fpgmaas/cookiecutter-uv](https://github.com/fpgmaas/cookiecutter-uv). |
| 52 | +- The `reference/` directory contains educational examples and may include optional dependencies. These are not required to use the example bridge. |
0 commit comments