Skip to content

docs(memory): add memory guide and sample - #982

Merged
AmaadMartin merged 1 commit into
google:mainfrom
AmaadMartin:v0.1.0-memory
Oct 5, 2026
Merged

AmaadMartin merged 1 commit into
google:mainfrom
AmaadMartin:v0.1.0-memory

Conversation

@adk-foundry-bot

Copy link
Copy Markdown
Contributor

Brings the memory subsystem up to adk-python v0.1.0: 3 module(s), unit tests, unit guide, and sample.

4 files, 518 insertions, 0 deletions.

Part Where Files
Functional code core/src/memory/ 0
Tests core/test/memory/ 0
Unit guide docs/guides/memory/index.md 2
Sample samples/memory/ 2

Modules

adk-python v0.1.0 module Had What this adds
base_memory_service.py core/src/memory/base_memory_service.ts (already at parity) Verified at parity with adk-python v0.1.0; documented in unit guide and exercised in sample
in_memory_memory_service.py core/src/memory/in_memory_memory_service.ts (already at parity) Verified at parity with adk-python v0.1.0; documented in unit guide and exercised in sample
vertex_ai_rag_memory_service.py core/src/memory/vertex_ai_rag_memory_service.ts (already at parity) Verified at parity with adk-python v0.1.0; documented in unit guide and exercised in sample

Interface discrepancies

Two divergences from adk-python v0.1.0, both documented in the unit guide. adk-js follows the later adk-python behavior in each case.

Divergence adk-python v0.1.0 adk-js
searchMemory response shape groups events in MemoryResult objects by session_id returns a flat MemoryEntry[]
InMemoryMemoryService keyword match substring match on raw event text whole-word match (flight does not match flights)

Public and protected member signatures are otherwise direct idiomatic TypeScript translations.

Deletions

0 lines across 0 files; no file on main is deleted.

File − Reason

Evidence

samples/memory/, demonstrating memory end to end:

$ npx tsx samples/memory/agent.ts
{"id":"urphHjvR","author":"memory_showcase_agent","isFinal":false,"functionCalls":["recallUserMemories"],"functionResponses":[],"artifactDelta":{},"text":""}
{"id":"FHxUzFwf","author":"memory_showcase_agent","isFinal":false,"functionCalls":[],"functionResponses":["recallUserMemories"],"artifactDelta":{"memory_digest.json":0},"text":""}
{"id":"jrIci8p3","author":"memory_showcase_agent","isFinal":true,"functionCalls":[],"functionResponses":[],"artifactDelta":{},"text":"Recalled 2 memory entries for user-1 in memory_sample_app: [2025-02-10T09:15:00.000Z] user: \"We booked flights to Lisbon with Nadia for October 14 and requested vegetarian meals.\" | [2025-02-10T09:16:00.000Z] model: \"Confirmed Lisbon hotel near Rossio Square with late check-in.\""}
Memories visible to unindexed-user: []
SAMPLE OK (exit 0)

memory in adk web

Local verification on the branch:

Command Result
npx vitest run core/test/memory Tests 99 passed (99)
npm run build exit 0

Re-verified on this exact commit (the reviewed change squashed onto current main):

Command Result
check_license.sh clean
npm run build exit 0

What a reviewer should decide

  • No core/src/memory changes required: All 3 memory module(s) in adk-js already satisfy adk-python v0.1.0; this PR adds the unit guide and runnable sample.

@AmaadMartin
AmaadMartin merged commit f49cc1b into google:main Oct 5, 2026
15 of 16 checks passed
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