Skip to content

feat: add legacy environment servers - #3490

Merged
ananthsub merged 0 commit into
ananthsub/episode-orchestration-08-hermes-sandbox-executionfrom
ananthsub/episode-orchestration-09-legacy-adapter
Sep 28, 2026
Merged

ananthsub merged 0 commit into
ananthsub/episode-orchestration-08-hermes-sandbox-executionfrom
ananthsub/episode-orchestration-09-legacy-adapter

Conversation

@ananthsub

@ananthsub ananthsub commented Sep 17, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

Adds the generic raw Agent /run compatibility Environment Server, aggregation forwarding, generated configs, agent swapping, environment initialization, migration tooling, and compatibility tests. It also retains the single-agent-turn projection adapter used by the proof environment.

Single-agent interaction flow

This diagram shows the built-in single-agent use case. Other Environment Server protocols may coordinate different participants and use different request, result, and lifecycle flows.

sequenceDiagram
    participant C as Rollout collector
    participant E as Environment Server
    participant R as Task / Resources Server
    participant A as Agent Server
    participant M as Model Server
    participant S as Task sandbox

    C->>E: POST /run
    E->>R: Seed task session
    R-->>E: Tool access and optional SandboxAccess
    E->>A: Seed agent session
    A->>S: Connect as borrower when supplied
    E->>A: Invoke /v1/responses
    A->>M: Model and capture requests
    A-->>E: Agent response
    E->>A: Close agent session
    E->>R: Verify response
    E->>R: Close task session
    E-->>C: Episode result
Loading

The Environment Server coordinates ordering and the final result. Agent and Task/Resources Servers retain ownership of the state and resources they create.

This is part 11 of 13 in the Environment Server stack. Previous: #3489. Next: #3491.

Validation

  • uv run pytest tests/unit_tests/test_benchmarks.py tests/unit_tests/test_environment_validation.py tests/unit_tests/test_global_config.py tests/unit_tests/test_rollout_collection.py -q

Rollouts

See the final PR for end-to-end rollout evidence.

Compatibility and benchmark impact

Existing agents are fronted without changing their request or result body.

@copy-pr-bot

copy-pr-bot Bot commented Sep 17, 2026

Copy link
Copy Markdown

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@ananthsub
ananthsub added this pull request to stack #3493 September 17, 2026 16:31
@ananthsub ananthsub changed the title ananthsub/episode orchestration 09 legacy adapter feat: add single-agent legacy episode adapter Sep 17, 2026
@ananthsub
ananthsub force-pushed the ananthsub/episode-orchestration-09-legacy-adapter branch from ec31446 to ee067a8 Compare September 17, 2026 20:17
@ananthsub
ananthsub force-pushed the ananthsub/episode-orchestration-09-legacy-adapter branch 2 times, most recently from ae7b48b to 3685aff Compare September 18, 2026 00:55
@ananthsub ananthsub changed the title feat: add single-agent legacy episode adapter feat: add legacy single-agent environment server Sep 18, 2026
@ananthsub
ananthsub force-pushed the ananthsub/episode-orchestration-09-legacy-adapter branch 2 times, most recently from 1042f7a to 4ce672a Compare September 18, 2026 01:32
@marta-sd marta-sd changed the title feat: add legacy single-agent environment server feat: add legacy environment servers Sep 18, 2026
@ananthsub
ananthsub marked this pull request as ready for review September 18, 2026 19:45
@nemo-automation-bot
nemo-automation-bot Bot requested review from a team September 18, 2026 19:46
@ananthsub
ananthsub force-pushed the ananthsub/episode-orchestration-09-legacy-adapter branch from 1144d22 to 2d4fcbf Compare September 18, 2026 22:27
@ananthsub
ananthsub force-pushed the ananthsub/episode-orchestration-09-legacy-adapter branch from 2d4fcbf to cfca63f Compare September 18, 2026 22:31
@ananthsub
ananthsub force-pushed the ananthsub/episode-orchestration-09-legacy-adapter branch from cfca63f to 4620c91 Compare September 18, 2026 22:37
@ananthsub
ananthsub force-pushed the ananthsub/episode-orchestration-09-legacy-adapter branch from 4620c91 to 5cd48fd Compare September 18, 2026 22:42
@yaoyu-33

Copy link
Copy Markdown
Contributor

Could we generate the Environment Server bindings at startup instead of updating every YAML?

For explicitly supported agent/resources pairings, select the native lifecycle; otherwise use legacy_agent. Explicit YAML bindings would take precedence, and the route would stay fixed for the run—no fallback after execution errors.

I made a small offline demo to illustrate this. It isn’t wired into runtime yet. Just an alternative to consider; I’ll leave the final approach to you.

@marta-sd

Copy link
Copy Markdown
Contributor

Could we generate the Environment Server bindings at startup instead of updating every YAML?

For explicitly supported agent/resources pairings, select the native lifecycle; otherwise use legacy_agent. Explicit YAML bindings would take precedence, and the route would stay fixed for the run—no fallback after execution errors.

I made a small offline demo to illustrate this. It isn’t wired into runtime yet. Just an alternative to consider; I’ll leave the final approach to you.

I considered this but concluded that I'd rather update all configs. I want this to be fully transparent to the user - if we generate this part of the config at runtime I think this might be confusing plus it will take them longer to migrate. I want them to have an easy way to update (thus the script) but I don't want this to happen auto-magically. This will get especially confusing once we start updating the agents and folks will actually start swapping them.

This branch was successfully deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:env-infra Shared environment framework, lifecycle, registry, scaffolding, and validation complexity:high Cross-component or shared-contract change with a large review surface feature New capabilities, enhancements, or enablement work needs-review PR is ready for code review and waiting on a reviewer sla:review-overdue Review response is over the one-business-day SLA

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants