feat(evals): add harbor infra for terminal-bench evals#215
Open
feat(evals): add harbor infra for terminal-bench evals#215
Conversation
|
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.
Summary
Adds the ability to run deepagents-js against terminal-bench benchmarks via Harbor.
Harbor is a Python-only benchmark framework -- it can only load Python agent classes. Since our agent runs in Node.js, we need a thin Python wrapper that acts as a bridge between the two runtimes. This PR adds that bridge.
Also adds support for running benchmarks on LangSmith hosted sandboxes as a custom Harbor environment, alongside Docker and Daytona.
Architecture
Harbor requires agents to be Python classes extending
BaseAgent. Our wrapper (DeepAgentsJSWrapper) satisfies that contract but delegates all actual agent work to Node.js:run(instruction, environment)on our Python wrapperrunner.ts, which creates adeepagentsagentls -la), the Node process sends anexec_requestto Pythonenvironment.exec()(which runs the command in the sandboxed container) and sends the result back as anexec_responseBaseSandboxclass, which builds shell commands and routes them throughexecute()donemessage with the full message history, and Python saves the trajectory in Harbor's ATIF formatLangSmith Sandbox Support
Adds
LangSmithEnvironment, a custom HarborBaseEnvironmentimplementation backed by thelangsmith.sandboxSDK. Harbor supports custom environments via--environment-import-path(orenvironment.import_pathin YAML config), which dynamically imports any class that extendsBaseEnvironment.The environment automatically resolves the correct container image from the task's
docker_imagefield intask.toml(the same pre-built images used by Daytona/E2B), so tasks run with the full environment they expect (gcc, weights, test harness, etc.).Key files:
langsmith_environment.py-- implements allBaseEnvironmentabstract methods (exec,start,stop,upload_file,download_file, etc.) usingAsyncSandboxClient/AsyncSandboxlangsmith-env-config.yaml-- minimal YAML config for use withharbor run -cHow to run