Skip to content

Clarify what common.ai message_history does and does not cover - #74625

Merged
Lee-W merged 2 commits into
apache:mainfrom
astronomer:common-ai-agent-memory-docs
Oct 14, 2026
Merged

Lee-W merged 2 commits into
apache:mainfrom
astronomer:common-ai-agent-memory-docs

Conversation

@Lee-W

@Lee-W Lee-W commented Oct 13, 2026 •

Copy link
Copy Markdown
Member

Why

The message_history page never said what message_history does and does not cover. A reader could assume a built-in cross-session memory exists, or not know how to bound a growing session.

What

Update providers/common/ai/docs/message_history.rst:

  • Message format, and limiting session size: states that the transcript is stored as pydantic-ai's JSON message format and grows cumulatively. Documents that ProcessHistory works through capabilities=, with a tool-call-safe example, and that the transcript pushed to XCom is then the trimmed one. Also covers trimming in a downstream task and the object-storage XCom backend.
  • Cross-session facts: states that the operator has no built-in cross-session memory, and says to store facts yourself, load them in an upstream task, and pass them in the prompt or instructions.
  • Related pydantic-ai documentation: links to the pydantic-ai message history page.

Was generative AI tooling used to co-author this PR?
  • Yes (please specify the tool below)

Generated-by: [Claude] following the guidelines


  • Read the Pull Request Guidelines for more information. Note: commit author/co-author name and email in commits become permanently public when merged.
  • For fundamental code changes, an Airflow Improvement Proposal (AIP) is needed.
  • When adding dependency, check compliance with the ASF 3rd Party License Policy.
  • For significant user-facing changes create newsfragment: {pr_number}.significant.rst, in airflow-core/newsfragments. You can add this file in a follow-up commit after the PR is created so you know the PR number.

Lee-W added 2 commits October 13, 2026 18:57
Readers looking for agent memory in common.ai land on this page, but it did not say that message_history is only a transcript hand-off between runs, with no built-in cross-session memory. Point them to the pydantic-ai message history documentation for what the underlying library offers.
…sessions

- Document that ProcessHistory works through capabilities= and that the
  transcript pushed to XCom is then the trimmed one
- Add a tool-call-safe history processor example
- Say how to carry facts across sessions: store them and load them in an
  upstream task
- Shorten the section that repeated the storage guidance above it
@Lee-W
Lee-W force-pushed the common-ai-agent-memory-docs branch from a7b76a8 to 50623ad Compare October 13, 2026 18:01
@Lee-W
Lee-W merged commit 3a23d44 into apache:main Oct 14, 2026
71 checks passed
@Lee-W
Lee-W deleted the common-ai-agent-memory-docs branch October 14, 2026 08:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants