Repository navigation
Conversation
Contributor
Author
|
/ok to test 1404c62 |
This was referenced Nov 17, 2026
Contributor
Author
|
/ok to test 60f79a5 |
ffrujeri
force-pushed
the
ffrujeri/birdbench-single-agent-turn
branch
from
November 17, 2026 18:06
ba9f9a0 to
3c40e1e
Compare
…episode Add a second bird_sql entrypoint, catalog_app.py, that gives the agent three of Auto Ontology's tools over its catalog of the BIRD databases, as direct_http routes: retrieve searches the catalog, run_sql checks a query against it and runs it read-only, and submit checks and runs the final query. The agent sees no schema. Any harness can call the tools; the tools and the catalog belong to the environment. - Each episode gets a sandbox from a catalog image (Auto Ontology, the BIRD databases and their catalog). At the seed the server starts it, the catalog's Postgres and the episode's tool process (catalog_tool_server.py, delivered through SandboxSpec.files), which keeps one Auto Ontology ToolContext for the episode. verify, close and shutdown stop the sandbox. - The tools call Auto Ontology's own functions with its 24-call budget; past it only submit is served, and an accepted submission ends the tools. - verify grades the SQL of the last submit answered "Accepted.", with bird_sql's rules, from the rollout alone (bird_sql gains an answer_sql hook). - benchmarks/birdbench/catalog_tools.yaml runs BIRD dev this way; prepare.py --catalog-tools writes rows that offer the tools and carry no sql_context. Plain bird_sql is unchanged. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Felipe Vieira Frujeri <[email protected]>
catalog_tool_server.py is the program the catalog Resources Server uploads into each episode's sandbox. It listens only on a Unix socket and serves no HTTP, so name it catalog_tool_runner.py, as Gym names in-sandbox programs (partner_if's tool_runner.py, the agents' sandbox runners). Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Felipe Vieira Frujeri <[email protected]>
… refuse to start without it The benchmark listing resolves every benchmark config, and catalog_tools.yaml declared the embedding key as a mandatory value (`???`), so the listing skipped it and test_every_repo_benchmark_appears_in_listing failed. The config now reads the key with oc.select, and the catalog server refuses a catalog setting with no value, naming ++bird_catalog_api_key, before any episode starts. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Felipe Vieira Frujeri <[email protected]>
ffrujeri
force-pushed
the
ffrujeri/birdbench-catalog-tools
branch
from
November 17, 2026 19:27
60f79a5 to
6b5566f
Compare
Contributor
Author
|
/ok to test 6b5566f |
Contributor
Author
|
Closing this direction for now: the Auto Ontology catalog stays inside the agent harness's sandbox, in the Auto Ontology Agent Server (#6289), rather than behind the bird_sql Resources Server's tools. The parts the agent needs moved up the stack, without the catalog server: #6288 now holds only the catalog image (on #6274, with the Auto Ontology pin in its build_image.sh), and #6289 writes its own BIRD dev rows with prepare.py's agent_context option. The branch |
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
A second
bird_sqlentrypoint,catalog_app.py, that serves three of Auto Ontology's tools over its catalog of the BIRD databases, asdirect_httproutes:retrieverun_sqlsubmitbenchmarks/birdbench/catalog_tools.yamlruns BIRD dev this way: the agent gets the question and the tools, no schema.Why
Auto Ontology's ReAct agent answers with these three tools, and none of them calls a model. Serving them from the environment makes them usable by any harness (
simple_agent, Codex, Hermes, ...), keeps the trajectories ordinary Gym trajectories for training, and keeps the catalog with the environment rather than inside one agent.How
catalog_tool_runner.py, delivered throughSandboxSpec.files. The runner listens only on a Unix socket in the sandbox; each route call reaches it through one sandbox exec. It keeps one Auto OntologyToolContextper episode and calls Auto Ontology's ownretrieve,run_sqlandsubmit.verify, close and server shutdown stop the sandbox.submitis served. An accepted submission ends the tools.verifygrades the SQL of the lastsubmitansweredAccepted., withbird_sql's rules, from the rollout alone, so saved rollouts can be graded again without a sandbox.bird_sqlgains a one-method hook,answer_sql; its behavior is unchanged.prepare.py --catalog-toolswritesbirdbench_sqlite_dev_catalog_tools.jsonl, whose rows offer the tools inresponses_create_params.toolsand carry nosql_context. Prompt:prompts/catalog_tools_sqlite.yaml.retrieveembeds each search, so a run passes the key of the catalog's embedding endpoint as++bird_catalog_api_key=<key>.catalog_tools.yamlreads it withoc.select, so the benchmark listing resolves the config without it; the server refuses to start while acatalog_environmentsetting has no value.The catalog image is built outside Gym: auto-ontology-eval's
scripts/build_agent_image.shingests and compiles BIRD dev with Auto Ontology's pipeline. The image contract is inresources_servers/bird_sql/README.md, "Catalog tools".Stacked on #6274.
Validation
pytest resources_servers/bird_sql/tests benchmarks/birdbench/tests: 162 passed, 18 skipped. New tests cover the tool definitions, the seed (sandbox spec, delivered files, catalog and tool-process start), seed failure, release, each route's reply, tool errors, a tool call without a session, the in-sandbox budget, accepted-submission handling and the socket protocol, and verify grading only the last accepted submission.pre-commit run --files <changed files>: passed.tests/unit_tests/environment/test_benchmarks.py::TestDiscoverBenchmarksInDir::test_every_repo_benchmark_appears_in_listing: passes (it failed while the key was a mandatory???).gym env validate --config benchmarks/birdbench/catalog_tools.yaml(with the inference_provider model config): valid.Rollout evidence
Smoke on the first 5 BIRD dev tasks,
simple_agentwith Claude Opus 5.5 on a local Docker sandbox from the auto-ontology-eval catalog image: 5/5 correct. Each episode calledretrieve, sometimesrun_sql, thensubmit, which returnedAccepted.; each sandbox was stopped afterwards.Compatibility
Plain
bird_sqlandbenchmarks/birdbench/config.yamlare unchanged. Known limit: until the end-of-turn signal lands (in the BIRD-Interact stack),simple_agentmakes one more model call after an acceptedsubmit, which adds tokens but does not change the grade.