diff --git a/sdk/guides/agent-acp.mdx b/sdk/guides/agent-acp.mdx index 58e999d0..d5d479c9 100644 --- a/sdk/guides/agent-acp.mdx +++ b/sdk/guides/agent-acp.mdx @@ -106,9 +106,7 @@ This example is available on GitHub: [examples/01_standalone_sdk/40_acp_agent_ex """Example: Using ACPAgent with Claude Code ACP server. This example shows how to use an ACP-compatible server (claude-code-acp) -as the agent backend instead of direct LLM calls. It also demonstrates -``ask_agent()`` — a stateless side-question that forks the ACP session -and leaves the main conversation untouched. +as the agent backend instead of direct LLM calls. Prerequisites: - Node.js / npx available @@ -124,25 +122,17 @@ from openhands.sdk.agent import ACPAgent from openhands.sdk.conversation import Conversation -agent = ACPAgent(acp_command=["npx", "-y", "@zed-industries/claude-code-acp"]) +agent = ACPAgent(acp_command=["npx", "-y", "claude-code-acp"]) try: cwd = os.getcwd() conversation = Conversation(agent=agent, workspace=cwd) - # --- Main conversation turn --- conversation.send_message( "List the Python source files under openhands-sdk/openhands/sdk/agent/, " "then read the __init__.py and summarize what agent classes are exported." ) conversation.run() - - # --- ask_agent: stateless side-question via fork_session --- - print("\n--- ask_agent ---") - response = conversation.ask_agent( - "Based on what you just saw, which agent class is the newest addition?" - ) - print(f"ask_agent response: {response}") finally: # Clean up the ACP server subprocess agent.close()