Skip to content

Commit fa891d2

Browse files
authored
docs: update readme
1 parent a2d046f commit fa891d2

File tree

1 file changed

+23
-8
lines changed

1 file changed

+23
-8
lines changed

README.md

Lines changed: 23 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ Python SDK for the Agent Client Protocol (ACP). Build agents that speak ACP over
1515
- Process helpers such as `spawn_agent_process` for embedding agents and clients directly in Python
1616
- Batteries-included examples that exercise streaming updates, file I/O, and permission flows
1717
- Optional Gemini CLI bridge (`examples/gemini.py`) for the `gemini --experimental-acp` integration
18+
- Experimental contrib modules (`acp.contrib`) that streamline session state, tool call tracking, and permission prompts
1819

1920
## Install
2021

@@ -134,23 +135,37 @@ Full example with streaming and lifecycle hooks lives in [examples/echo_agent.py
134135
Use `acp.helpers` to build protocol payloads without manually shaping dictionaries:
135136

136137
```python
137-
from acp import start_tool_call, text_block, tool_content, update_tool_call
138-
139-
start = start_tool_call("call-1", "Inspect config", kind="read", status="pending")
140-
update = update_tool_call(
141-
"call-1",
142-
status="completed",
143-
content=[tool_content(text_block("Inspection finished."))],
138+
from acp import (
139+
start_read_tool_call,
140+
text_block,
141+
tool_content,
142+
update_available_commands,
143+
update_tool_call,
144144
)
145+
146+
start = start_read_tool_call("call-1", "Inspect config", path="config.toml")
147+
commands = update_available_commands([])
148+
update = update_tool_call("call-1", status="completed", content=[tool_content(text_block("Done."))])
145149
```
146150

147-
Helpers cover content blocks (`text_block`, `resource_link_block`), embedded resources, tool calls (`start_edit_tool_call`, `update_tool_call`), and session updates (`update_agent_message_text`, `session_notification`).
151+
Helpers cover content blocks (`text_block`, `resource_link_block`), embedded resources, tool calls (`start_edit_tool_call`, `update_tool_call`), and session updates (`update_agent_message_text`, `update_available_commands`, `update_current_mode`, `session_notification`).
152+
153+
## Contrib helpers
154+
155+
The experimental `acp.contrib` package captures patterns from reference integrations:
156+
157+
- `SessionAccumulator` (`acp.contrib.session_state`) merges `SessionNotification` streams into immutable snapshots for UI rendering.
158+
- `ToolCallTracker` (`acp.contrib.tool_calls`) generates consistent tool call starts/updates and buffers streamed content.
159+
- `PermissionBroker` (`acp.contrib.permissions`) wraps permission requests with sensible default option sets.
160+
161+
Read more in [docs/contrib.md](docs/contrib.md).
148162

149163
## Documentation
150164

151165
- Project docs (MkDocs): https://psiace.github.io/agent-client-protocol-python/
152166
- Local sources: `docs/`
153167
- [Quickstart](docs/quickstart.md)
168+
- [Contrib helpers](docs/contrib.md)
154169
- [Releasing](docs/releasing.md)
155170

156171
## Gemini CLI bridge

0 commit comments

Comments
 (0)