Repository navigation
Add ACP agents examples (TypeScript and Python) - #162
Open
max-sudolabs wants to merge 7 commits into
Open
max-sudolabs wants to merge 7 commits into
max-sudolabs wants to merge 7 commits into
Conversation
Drive OpenCode, goose or Claude Code inside an E2B sandbox with the official ACP client through sandbox.acp. One client for all agents; the agent's tools run inside the sandbox.
Python twin of acp-agents-js using AsyncSandbox.acp with agent-client-protocol.
Drop the per-agent config-file maps and the remote write loop; OpenCode reads the same JSON from the environment.
connectAcpAgent / connect_acp_agent replace the hand-built transport. The examples now fail if fizzbuzz.py in the sandbox does not print FizzBuzz, and the READMEs state the exact tool boundary.
Collaborator
Author
|
Depends on e2b-dev/E2B#1992: |
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this adds
examples/acp-agents-jsandexamples/acp-agents-python: one ACP client that drives OpenCode, goose or Claude Code inside an E2B sandbox, picked withAGENT=opencode|goose|claude.AcpAgent.start()from@e2b/acp/e2b-acpstarts the agent and connects the official ACP client (aclient()app in JS) over its stdin/stdout. Only the template and the start command differ per agent.allow_onceoption) and prints progress.OPENCODE_CONFIG_CONTENT, so no config file is written.fizzbuzz.pyin the sandbox and checks forFizzBuzz.README.mdand both entries intests/run-examples.ts.Verification
All 6 combinations (JS/Python × OpenCode/goose/Claude Code) ran live against local builds of the packages and passed the
FizzBuzzcheck.If an agent offers no
allow_onceoption, the example falls back to the first option.