docs: Add Python session identity ADR#6630
Draft
eavanvalkenburg wants to merge 1 commit into
Draft
Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Adds ADR 0029 to document Python identity lifetimes and boundaries across AgentSession, protocol task/session identifiers, response/message IDs, and framework continuation tokens, to reduce terminology overlap and guide follow-up work for native conversation propagation and A2A behavior.
Changes:
- Introduces ADR 0029 describing identity lifetimes and where each identifier should live (durable session state vs. per-response vs. continuation token vs. run/telemetry correlation).
- Documents current Python implementation behavior for A2A and OpenAI Responses continuation to ground the decision discussion.
- Enumerates remaining durable-state shape options (session subclasses vs. namespaced
session.statevs. richerservice_session_id) plus an A2Atask_id/reference_task_idsappendix.
| ) | ||
|
|
||
| structured_session = AgentSession( | ||
| service_session_id=ServiceSessionIdentity( |
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.
Motivation & Context
Python protocol and service integrations currently use session, task, response, and continuation identifiers with overlapping terminology. This ADR documents the lifetime boundaries for those identities so follow-up implementation work for native conversation propagation and A2A task/session behavior has a clearer design basis.
The ADR keeps AG-UI out of the session identity decision, preserves
service_session_idas an opaque service continuation handle, and focuses the remaining open design question on how Python should store additional durable continuation state across calls.Description & Review Guide
AgentSessionsubclasses, namespacedAgentSession.state, or richer service-ownedservice_session_idvalues.task_idvsreference_task_idsbehavior to validate in implementation.Related Issue
Related to #4673 and #4893. Does not close them.
Contribution Checklist
breaking changelabel (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.