Skip to content

docs: Add Python session identity ADR#6630

Draft
eavanvalkenburg wants to merge 1 commit into
microsoft:mainfrom
eavanvalkenburg:python-agent-session-identity-adr
Draft

docs: Add Python session identity ADR#6630
eavanvalkenburg wants to merge 1 commit into
microsoft:mainfrom
eavanvalkenburg:python-agent-session-identity-adr

Conversation

@eavanvalkenburg

Copy link
Copy Markdown
Member

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_id as 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

  • What are the major changes?
    • Adds ADR 0029 for Python identity lifetimes across sessions, tasks, service continuation, response IDs, and continuation tokens.
    • Records the chosen direction to split identity storage by lifecycle.
    • Lists the remaining durable-state options: protocol-specific AgentSession subclasses, namespaced AgentSession.state, or richer service-owned service_session_id values.
    • Adds an A2A appendix for task_id vs reference_task_ids behavior to validate in implementation.
  • What is the impact of these changes?
  • What do you want reviewers to focus on?
    • Whether the ADR correctly separates service continuation, durable protocol state, response identity, and continuation tokens.
    • Whether the remaining durable-state options are framed clearly enough for a follow-up decision.

Related Issue

Related to #4673 and #4893. Does not close them.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • All unit tests pass, and I have added new tests where possible
  • The PR follows the Contribution Guidelines
  • This PR is linked to an issue and there is no other open PR for this issue (see Related Issue above).
  • This is not a breaking change. If it is a breaking change, add the breaking change label (or add "[BREAKING]" to the title prefix, before or after any language prefix) — a workflow keeps the label and title prefix in sync automatically.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings June 19, 2026 15:30
@moonbox3 moonbox3 added the documentation Improvements or additions to documentation label Jun 19, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Automated Code Review

Reviewers: 5 | Confidence: 85% | Result: All clear

Reviewed: Correctness, Security Reliability, Test Coverage, Failure Modes, Design Approach


Automated review by eavanvalkenburg's agents

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.state vs. richer service_session_id) plus an A2A task_id/reference_task_ids appendix.

)

structured_session = AgentSession(
service_session_id=ServiceSessionIdentity(
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants