Skip to content

Commit dab64db

Browse files
simonrosenbergDebug Agentopenhands-agent
authored
docs(sdk): document ACP remote conversation routing (OpenHands#399)
Co-authored-by: Debug Agent <debug@example.com> Co-authored-by: openhands <openhands@all-hands.dev>
1 parent 0406f74 commit dab64db

2 files changed

Lines changed: 28 additions & 0 deletions

File tree

sdk/guides/agent-acp.mdx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,22 @@ Because the ACP server manages its own tools and context, these `AgentBase` feat
4141

4242
Passing any of these raises `NotImplementedError` at initialization.
4343

44+
## ACPAgent with RemoteConversation
45+
46+
`ACPAgent` also works with remote agent-server deployments such as `APIRemoteWorkspace`, `DockerWorkspace`, and other `RemoteWorkspace`-backed setups.
47+
48+
When `RemoteConversation` detects an `ACPAgent`, it automatically uses the ACP-capable conversation routes for:
49+
50+
- conversation creation
51+
- conversation info reads
52+
- conversation counting
53+
54+
The rest of the lifecycle, including events, runs, pauses, and secrets, continues to use the standard agent-server routes. This keeps the existing remote execution flow intact while isolating the schema-sensitive ACP contract under `/api/acp/conversations`.
55+
56+
<Warning>
57+
If you attach to an existing conversation by `conversation_id`, use `ACPAgent` for ACP-backed conversations. Attaching with a regular `Agent` to an ACP conversation ID is rejected explicitly to avoid mixing the standard and ACP conversation contracts.
58+
</Warning>
59+
4460
## How It Works
4561

4662
- **Subprocess delegation**: `ACPAgent` spawns the ACP server and communicates via JSON-RPC over stdin/stdout
@@ -266,6 +282,10 @@ cd software-agent-sdk
266282
uv run python examples/02_remote_agent_server/09_acp_agent_with_remote_runtime.py
267283
```
268284

285+
<Note>
286+
On the agent-server side, the ACP-capable REST surface lives under `/api/acp/conversations`, including `POST`, `GET`, `search`, `batch get`, and `count`.
287+
</Note>
288+
269289
## Next Steps
270290

271291
- **[Creating Custom Agents](/sdk/guides/agent-custom)** — Build specialized agents with custom tool sets and system prompts

sdk/guides/agent-server/api-sandbox.mdx

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,14 @@ assert isinstance(conversation, RemoteConversation)
8484

8585
All agent execution happens on the remote runtime infrastructure.
8686

87+
<Note>
88+
The same runtime flow also supports `ACPAgent`. For an end-to-end example, see the [ACP Agent guide](/sdk/guides/agent-acp#remote-runtime-example).
89+
</Note>
90+
91+
<Warning>
92+
ACP-backed remote conversations use the ACP-capable conversation endpoints under `/api/acp/conversations` for creation, reads, and counts. If you reconnect to an existing ACP conversation by `conversation_id`, use `ACPAgent` rather than a standard `Agent`.
93+
</Warning>
94+
8795
## Ready-to-run Example
8896

8997
<Note>

0 commit comments

Comments
 (0)