Skip to content

Python: pass AG-UI state through AgentSession#5199

Draft
Bortlesboat wants to merge 1 commit intomicrosoft:mainfrom
Bortlesboat:codex/issue-5197-ag-ui-session-state
Draft

Python: pass AG-UI state through AgentSession#5199
Bortlesboat wants to merge 1 commit intomicrosoft:mainfrom
Bortlesboat:codex/issue-5197-ag-ui-session-state

Conversation

@Bortlesboat
Copy link
Copy Markdown

Motivation and Context

Fixes #5197.

AG-UI already carried request state in metadata and model-facing state injection, but it never copied that state into AgentSession.state. That left ContextProvider implementations with an empty session state when runs came through the AG-UI path.

Description

  • copy AG-UI request state into the created AgentSession
  • add a regression test that captures the session passed to agent.run(...) and asserts the request state is available there

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add [BREAKING] prefix to the title of the PR.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Python: [Bug]: The current implementation of AG-UI fails to pass the state to AgentSession.

2 participants