Skip to content

MIL-116 Add memory showcase example#1861

Open
davidmarkgardiner wants to merge 1 commit into
kagent-dev:mainfrom
davidmarkgardiner:codex/MIL-116-memory-showcase
Open

MIL-116 Add memory showcase example#1861
davidmarkgardiner wants to merge 1 commit into
kagent-dev:mainfrom
davidmarkgardiner:codex/MIL-116-memory-showcase

Conversation

@davidmarkgardiner
Copy link
Copy Markdown

Summary

  • add a memory showcase manifest with chat and embedding ModelConfigs plus a memory-enabled Agent
  • add a runnable A2A demo script that stores a fact, verifies it in memory, and retrieves it from a later interaction
  • document the memory model, TTL behavior, prerequisites, and run/cleanup commands

Refs MIL-116

Validation

  • bash -n examples/memory-showcase/run-demo.sh
  • kubectl apply --dry-run=client -f examples/memory-showcase/memory-showcase.yaml
  • kubectl apply -f examples/memory-showcase/memory-showcase.yaml
  • kubectl wait --for=condition=Ready agent/memory-showcase-agent -n kagent --timeout=3m

Live script reached the agent, but the local cluster has an invalid kagent-openai secret, so the model call returned OpenAI 401 and memory was not saved in this environment.

Copilot AI review requested due to automatic review settings May 13, 2026 06:52
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds a new “memory showcase” example to demonstrate kagent long-term memory end-to-end (agent manifest + runnable A2A script + documentation), intended to help users understand and validate memory persistence across separate A2A contexts.

Changes:

  • Adds a runnable demo script that sends two streamed A2A turns, verifies memory is stored, then verifies later retrieval.
  • Adds Kubernetes resources (2 ModelConfigs + 1 memory-enabled declarative Agent) to deploy the demo.
  • Adds documentation describing the memory persistence model, TTL/pruning behavior, and run/cleanup steps.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
examples/memory-showcase/run-demo.sh Scripted A2A streaming demo that stores and later retrieves a fact via memory, with basic assertions.
examples/memory-showcase/README.md Usage and conceptual documentation for memory persistence and how to run the demo.
examples/memory-showcase/memory-showcase.yaml Manifest defining chat + embedding model configs and a memory-enabled declarative agent for the demo.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


Memory search is scoped by agent name and user ID. This demo sends a stable `X-User-ID` header so the second interaction can retrieve memory saved by the first interaction, even though the script uses a separate A2A context ID for the second turn.

`ttlDays` controls how long a memory remains valid before it is eligible for pruning. This example sets `ttlDays: 15`; omitting it or setting it to zero uses the server default of 15 days. Expired memories with low access counts are deleted by pruning. Expired memories with an access count of at least 10 are considered popular, have their TTL extended by 15 days, and have their access count reset.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants