Minimal counterpart to simple_redis_memory. This
example uses the managed redis-agent-memory backend (the library default)
with no self-hosted Agent Memory Server or Docker setup.
RedisSessionMemoryServicefor session persistenceRedisLongTermMemoryServicefor semantic memory search- ADK built-in
preload_memoryandload_memorytools
This example intentionally avoids opensource-only features such as auto-summarization, extraction strategies, recency-boosted search, and MCP.
- Python 3.10+
- A Redis Agent Memory store (
REDIS_AGENT_MEMORY_STORE_ID+ API key) - Google API key for Gemini
From the repository root (editable install for local PR testing):
uv venv
uv pip install -e ".[all,examples]"Or use make dev if you also want test/lint tooling.
Note: Even memory-only examples import
adk_redis, whose top-level__init__.pycurrently pulls in search tools that requireredisvl. The[all]extra installs that dependency.[memory]alone is not enough today.
cd examples/managed_memory_quickstart
cp .env.example .env
# Edit .env with your credentialsuv run python main.pyOpen http://localhost:8080 in your browser.
Session 1 — share a few facts:
Hi! My name is Alex.
My favorite color is teal.
I have a cat named Sammy.
Wait for a reply after each message.
Session 2 — click New Session (keep the same userId, e.g. user) and
ask:
What do you remember about me?
What is my favorite color?
Cross-session recall uses long-term memory (preload_memory / load_memory).
Facts are stored automatically after each turn via the agent's after_agent
callback — there is no separate seed step.
| Variable | Required | Default | Description |
|---|---|---|---|
GOOGLE_API_KEY |
Yes | — | Gemini API key |
REDIS_AGENT_MEMORY_API_BASE_URL |
Yes | — | Managed API base URL |
REDIS_AGENT_MEMORY_API_KEY |
Yes | — | Managed API key |
REDIS_AGENT_MEMORY_STORE_ID |
Yes | — | Memory store ID |
REDIS_MEMORY_NAMESPACE |
No | managed_memory_quickstart |
Namespace for isolation |
REDIS_MEMORY_SEARCH_TOP_K |
No | 5 |
Results returned by search_memory |
PORT |
No | 8080 |
ADK web server port |
This example uses a custom main.py with get_fast_api_app because ADK
session and memory services must be registered through
get_service_registry(). The adk web runner cannot register those services.
For a tools-only example that runs with adk web, see
travel_agent_memory_tools.
| Example | Backend | Runner |
|---|---|---|
| This quickstart | Managed (redis-agent-memory) |
python main.py |
simple_redis_memory |
Self-hosted (default) | python main.py |
travel_agent_memory_tools |
Either (env switch) | adk web . |
See examples/README.md for the full matrix.