Repository navigation
feat(bird_interact): run BIRD-Interact in its Environment Server, with no Resources Server - #5409
Draft
ffrujeri wants to merge 1 commit into
Conversation
Contributor
Author
|
/ok to test cef7fc5 |
ffrujeri
force-pushed
the
ffrujeri/bird-interact-environment-server
branch
from
November 2, 2026 22:21
cef7fc5 to
1ba7db8
Compare
Contributor
Author
|
/ok to test 1ba7db8 |
ffrujeri
force-pushed
the
ffrujeri/bird-interact-environment-server
branch
from
November 2, 2026 23:01
1ba7db8 to
8ae6ea8
Compare
This was referenced Nov 2, 2026
ffrujeri
changed the base branch from
ffrujeri/self-contained-session-routing
to
ffrujeri/agent-session-client
November 2, 2026 23:03
Contributor
Author
|
/ok to test 8ae6ea8 |
ffrujeri
force-pushed
the
ffrujeri/bird-interact-environment-server
branch
from
November 2, 2026 23:37
8ae6ea8 to
0bb3a5e
Compare
ffrujeri
changed the base branch from
ffrujeri/agent-session-client
to
ffrujeri/simple-agent-session-continuation
November 2, 2026 23:37
Contributor
Author
|
/ok to test 0bb3a5e |
This was referenced Nov 3, 2026
ffrujeri
force-pushed
the
ffrujeri/bird-interact-environment-server
branch
from
November 4, 2026 21:33
0bb3a5e to
b14c4bc
Compare
Contributor
Author
|
/ok to test b14c4bc |
…h no Resources Server BIRD-Interact moves into one Environment Server for each mode, as approach A of the BIRD-Interact RFC proposes. The server subclasses BaseEnvironmentServerWithTools directly: its run_episode starts the database sandbox, serves the a-Interact tools, seeds the agent session, runs the turns and grades them. The #5202 prototype splits each episode between an Environment Server and a Resources Server; here the Environment Server owns the database sandbox, the user simulator, the grader, the phase and BIRD-COIN rules and the turns. - The agent session (agent_session.py) is seeded with the episode's grants, resumes across c-Interact turns, and is closed before grading. A turn over turn_timeout_seconds fails the episode for a retry, the optional interaction deadline stops the turns and still grades, and a failure keeps the completed turns, the tool calls and the agent's evidence. - c-Interact: a question or a submission in each agent reply becomes an in-process call. No routes between two servers, and no session cookie that reaches every route. - a-Interact: the nine tools are a TypedToolset of the episode, served over direct HTTP, MCP or both (tool_transports), with the signed episode token, on any of several workers. The first request declares them as strict function tools over direct HTTP, and none over MCP alone. - Each episode starts its database sandbox and registers its stop, so the sandbox stops on every path, including shutdown. A command that fails for infrastructure reasons runs again on a fresh sandbox; then c-Interact fails the episode for a retry and a-Interact masks the sample, as does a simulator failure in an a-Interact ask. - A task without sol_sql, with custom test cases or without its database fails at seed, for good. - The example datasets are declared on the agent, one taskset for each mode, and validated by the Environment Server's task_data.py (the Harbor layout). gym env test's data and catalog checks still cover only Resources Servers (GYMINT-643). grading.py, simulator.py, task_data.py and the example data come from #5202 unchanged, apart from module paths and wording. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Felipe Vieira Frujeri <ffrujeri@nvidia.com>
ffrujeri
force-pushed
the
ffrujeri/bird-interact-environment-server
branch
from
November 6, 2026 17:23
b14c4bc to
81e2d19
Compare
Contributor
Author
|
/ok to test 81e2d19 |
This branch was previously 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.
Stacked on #5465 (
simple_agentcontinuation), which is on #5350, the top of theBaseEnvironmentServerWithToolsstack (#5346 → #5347 → #5348 → #5349 → #5350). Review those first; this PR's diff against #5465 isenvironment_servers/bird_interactonly.What changed
BIRD-Interact runs in one Environment Server for each mode, with no Resources Server. This is approach A of the BIRD-Interact RFC; #5202 is the prototype of approach B, which splits each episode between an Environment Server and a Resources Server.
environment_servers/bird_interactsubclassesBaseEnvironmentServerWithTools(#5347) directly, with no user-simulation base class. Itsrun_episodestarts the database sandbox, serves the a-Interact tools, seeds the agent session (agent_session.py), runs the turns and grades them. The server owns the database sandbox, the two-stage user simulator, the grader, the phase and BIRD-COIN rules and the turns.askandsubmit/c_interact/routesTypedToolsetof the episode, over direct HTTP, MCP or bothturn_timeout_secondsfails the episode for a retry, the optionalinteraction_timeout_secondsstops the turns and still grades, and the agent is closed before grading. A failure keeps the completed turns, the tool calls and the agent's evidence.bird_interact:sandbox_failed), as does a simulator failure in an a-Interactask(bird_interact:user_simulator_failed).direct_httpthe first request declares the nine tools as strict function tools; overmcpalone it declares none, because Codex refuses a request that declares tools.task_data.py, the Harbor layout.grading.py,simulator.py,task_data.pyand the example data come from feat(environment): add a user-simulation base class and BIRD-Interact on it #5202 unchanged apart from module paths and wording.data/example_rollouts.jsonlis regenerated from the smoke run below.Tracking: GYMINT-646 (Linear).
Validation
pytest environment_servers/bird_interact/tests/test_app.pymax_turnsmust be positive). The episode tests run with a scripted agent and user model and real database sandboxes on the host (localprovider)ng_test +entrypoint=environment_servers/bird_interact +should_validate_data=truegym dataset collate "+config_paths=[environment_servers/bird_interact/configs/bird_interact.yaml]" --mode example_validation --output-dir <tmp>example_metrics.jsonalready up to datepytest -n 12 tests/unit_testsat this PR's headdda609f86on the same machine (OpenSandbox compose, sandbox transfer and stop retry, Harbor validation, tasks and run summary, benchmark listing)pre-commit run --fileson every file both stacks changeRollout evidence
These runs are from before the rebase onto main at
dda609f86and the move of the turns into this server, which keep the behavior (the 37 episode tests pass unchanged); they have not been rerun since. Docker database sandboxes,num_workers: 4on each BIRD Environment Server, the five example tasks, two repeats. Policyazure/openai/eccn-gpt-6.1-sol; simulatoropenai/openai/eccn-gpt-6-luna.simple_agentsimple_agentover direct HTTPtool_transports: [mcp])What I checked in the rollouts:
askcontained a task's hidden knowledge entry.bookshop_2) is the known simulator issue the RFC records: the simulator calls a fraction a percentage, so the agent's ×100 answer fails.Compatibility
New server; existing servers do not change. #5202 stays open as the approach B prototype until these stacks are reviewed.
Not yet covered:
gym env test's data and catalog checks still run only for Resources Servers (GYMINT-643), PostgreSQL (Lite and Full), and rows with customtest_cases.🤖 Generated with Claude Code