Repository navigation
feat: add agent session lifecycle API - #3485
Merged
ananthsub merged 1 commit intoSep 22, 2026
Merged
Conversation
|
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
force-pushed
the
ananthsub/episode-orchestration-04-agent-session-api
branch
from
September 17, 2026 20:17
1a2de33 to
4c1825d
Compare
ananthsub
force-pushed
the
ananthsub/episode-orchestration-04-agent-session-api
branch
from
September 17, 2026 20:28
4c1825d to
2023ffa
Compare
ananthsub
force-pushed
the
ananthsub/episode-orchestration-04-agent-session-api
branch
from
September 18, 2026 00:55
2023ffa to
bbc99be
Compare
ananthsub
force-pushed
the
ananthsub/episode-orchestration-04-agent-session-api
branch
from
September 18, 2026 01:06
bbc99be to
6aa497c
Compare
ananthsub
force-pushed
the
ananthsub/episode-orchestration-04-agent-session-api
branch
from
September 18, 2026 01:32
6aa497c to
46830f3
Compare
ananthsub
marked this pull request as ready for review
September 18, 2026 19:45
ananthsub
requested review from
adil-a,
bxyu-nvidia,
cmunley1,
ffrujeri,
marta-sd and
yaoyu-33
September 18, 2026 19:48
ananthsub
force-pushed
the
ananthsub/episode-orchestration-04-agent-session-api
branch
from
September 18, 2026 20:44
46830f3 to
5ec2f55
Compare
ananthsub
force-pushed
the
ananthsub/episode-orchestration-04-agent-session-api
branch
from
September 18, 2026 22:27
290b878 to
8307c71
Compare
ananthsub
force-pushed
the
ananthsub/episode-orchestration-04-agent-session-api
branch
from
September 18, 2026 22:37
8307c71 to
60e526c
Compare
ananthsub
force-pushed
the
ananthsub/episode-orchestration-04-agent-session-api
branch
from
September 18, 2026 22:42
60e526c to
3085f03
Compare
ananthsub
force-pushed
the
ananthsub/episode-orchestration-04-agent-session-api
branch
from
September 19, 2026 01:02
3085f03 to
93844a1
Compare
marta-sd
previously approved these changes
Sep 21, 2026
Signed-off-by: Ananth Subramaniam <[email protected]>
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.
What does this PR do?
Defines agent seed/close contracts beside their Agent Server routes. Session seed carries episode/task identity plus optional tool and sandbox access; close repeats episode identity.
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 resultThe 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 6 of 13 in the Environment Server stack. Previous: #3545. Next: #3544.
Validation
uv run pytest tests/unit_tests/test_agent_sessions.py -qRollouts
See the final PR for end-to-end rollout evidence.
Compatibility and benchmark impact
Existing Agent Server
/runand/v1/responsesbehavior remains available.