{
  "id": "google-adk",
  "title": "Redis with Google Agent Development Kit (ADK)",
  "url": "https://redis.io/docs/latest/integrate/google-adk/",
  "summary": "Build AI agents with persistent memory, semantic search, and caching using Redis and Google ADK.",
  "tags": [
    "docs",
    "integrate",
    "oss",
    "rs",
    "rc"
  ],
  "last_updated": "2026-04-16T13:29:55-07:00",
  "children": [
    {
      "id": "redis-agent-memory",
      "summary": "Working and long-term memory for Google ADK agents using the Redis Agent Memory Server.",
      "title": "Redis Agent Memory",
      "url": "https://redis.io/docs/latest/integrate/google-adk/redis-agent-memory/"
    },
    {
      "id": "integration-patterns",
      "summary": "Three approaches for connecting Google ADK agents to Redis memory.",
      "title": "Memory integration patterns",
      "url": "https://redis.io/docs/latest/integrate/google-adk/integration-patterns/"
    },
    {
      "id": "search-tools",
      "summary": "Vector, hybrid, text, and range search tools for Google ADK agents.",
      "title": "Redis search tools",
      "url": "https://redis.io/docs/latest/integrate/google-adk/search-tools/"
    },
    {
      "id": "semantic-caching",
      "summary": "Cache LLM responses and tool results using semantic similarity with Redis.",
      "title": "Semantic caching",
      "url": "https://redis.io/docs/latest/integrate/google-adk/semantic-caching/"
    },
    {
      "id": "examples",
      "summary": "Complete examples for every adk-redis capability.",
      "title": "adk-redis examples",
      "url": "https://redis.io/docs/latest/integrate/google-adk/examples/"
    }
  ],
  "page_type": "content",
  "content_hash": "19bfa87a90dca2e075d24c74243c5a3a1f8ff7f37a0e977063a7c42c120a58f9",
  "sections": [
    {
      "id": "overview",
      "title": "Overview",
      "role": "overview",
      "text": "[Google Agent Development Kit (ADK)](https://google.github.io/adk-docs/) provides clean abstractions for building AI agents: interfaces for memory, sessions, tools, and callbacks. [adk-redis](https://github.com/redis-developer/adk-redis) implements these interfaces using Redis, giving agents persistent two-tier memory, semantic search for RAG, and response caching without requiring changes to agent logic."
    },
    {
      "id": "architecture",
      "title": "Architecture",
      "role": "content",
      "text": "adk-redis connects three backend systems to the ADK framework:\n\n- **[Redis Agent Memory Server](https://github.com/redis/agent-memory-server)** handles working memory (sessions), long-term memory (extracted facts), auto-summarization, and memory search.\n- **[RedisVL](https://redis.io/docs/latest/develop/ai/redisvl)** (Redis Vector Library) powers the search tools and local semantic cache provider.\n- **[LangCache](https://redis.io/langcache/)** provides managed semantic caching with server-side embeddings."
    },
    {
      "id": "prerequisites",
      "title": "Prerequisites",
      "role": "content",
      "text": "- **Redis 8.4+** with vector search support\n- **Agent Memory Server** for memory and session services\n\n[code example]"
    },
    {
      "id": "installation",
      "title": "Installation",
      "role": "setup",
      "text": "[code example]"
    },
    {
      "id": "quick-start",
      "title": "Quick start",
      "role": "content",
      "text": "Wire up Redis Agent Memory in a few lines:\n\n[code example]"
    },
    {
      "id": "capabilities",
      "title": "Capabilities",
      "role": "content",
      "text": "| Capability | Description | Page |\n|------------|-------------|------|\n| **Redis Agent Memory** | Working and long-term memory via framework services, REST tools, or MCP | [Redis Agent Memory](https://redis.io/docs/latest/integrate/google-adk/redis-agent-memory) |\n| **Integration patterns** | Framework-managed, LLM-controlled REST, and MCP tools | [Integration patterns](https://redis.io/docs/latest/integrate/google-adk/integration-patterns) |\n| **Search tools** | Vector, hybrid, text, and range search via RedisVL | [Search tools](https://redis.io/docs/latest/integrate/google-adk/search-tools) |\n| **Semantic caching** | LLM response and tool result caching | [Semantic caching](https://redis.io/docs/latest/integrate/google-adk/semantic-caching) |\n| **Examples** | Seven complete examples covering all capabilities | [Examples](https://redis.io/docs/latest/integrate/google-adk/examples) |"
    },
    {
      "id": "more-info",
      "title": "More info",
      "role": "content",
      "text": "- [adk-redis on GitHub](https://github.com/redis-developer/adk-redis)\n- [adk-redis on PyPI](https://pypi.org/project/adk-redis/)\n- [Car dealership tutorial](https://redis.io/tutorials/build-a-car-dealership-agent-with-google-adk-and-redis-agent-memory/)\n- [Redis Agent Memory Server](https://github.com/redis/agent-memory-server)\n- [RedisVL documentation](https://redis.io/docs/latest/develop/ai/redisvl)\n- [Google ADK documentation](https://google.github.io/adk-docs/)"
    }
  ],
  "examples": [
    {
      "id": "prerequisites-ex0",
      "language": "bash",
      "code": "# Start Redis\ndocker run -d --name redis -p 6379:6379 redis:8.4-alpine\n\n# Start Agent Memory Server\ndocker run -d --name agent-memory-server -p 8088:8088 \\\n  -e REDIS_URL=redis://host.docker.internal:6379 \\\n  -e GEMINI_API_KEY=your-key \\\n  -e GENERATION_MODEL=gemini/gemini-2.0-flash \\\n  -e EMBEDDING_MODEL=gemini/text-embedding-004 \\\n  redislabs/agent-memory-server:latest \\\n  agent-memory api --host 0.0.0.0 --port 8088 --task-backend=asyncio",
      "section_id": "prerequisites"
    },
    {
      "id": "installation-ex0",
      "language": "bash",
      "code": "# Memory and session services (requires Agent Memory Server)\npip install adk-redis[memory]\n\n# Search tools via RedisVL\npip install adk-redis[search]\n\n# Managed semantic caching via LangCache\npip install adk-redis[langcache]\n\n# Everything\npip install adk-redis[all]",
      "section_id": "installation"
    },
    {
      "id": "quick-start-ex0",
      "language": "python",
      "code": "from google.adk import Agent\nfrom google.adk.agents.callback_context import CallbackContext\nfrom google.adk.runners import Runner\nfrom adk_redis.sessions import (\n    RedisWorkingMemorySessionService,\n    RedisWorkingMemorySessionServiceConfig,\n)\nfrom adk_redis.memory import (\n    RedisLongTermMemoryService,\n    RedisLongTermMemoryServiceConfig,\n)\n\nsession_service = RedisWorkingMemorySessionService(\n    config=RedisWorkingMemorySessionServiceConfig(\n        api_base_url=\"http://localhost:8088\",\n        default_namespace=\"my_app\",\n    )\n)\nmemory_service = RedisLongTermMemoryService(\n    config=RedisLongTermMemoryServiceConfig(\n        api_base_url=\"http://localhost:8088\",\n        default_namespace=\"my_app\",\n    )\n)\n\nasync def after_agent(callback_context: CallbackContext):\n    await callback_context.add_session_to_memory()\n\nagent = Agent(\n    name=\"my_agent\",\n    model=\"gemini-2.5-flash\",\n    instruction=\"You are a helpful assistant with long-term memory.\",\n    after_agent_callback=after_agent,\n)\n\nrunner = Runner(\n    agent=agent,\n    app_name=\"my_app\",\n    session_service=session_service,\n    memory_service=memory_service,\n)",
      "section_id": "quick-start"
    }
  ]
}
