Skip to main content
Ryumem provides zero-boilerplate integration for Google’s Agent Developer Kit, automatically adding memory tools to your agents.

Quick Start

1

Install Dependencies

2

Initialize Ryumem

Need to set up a Ryumem server? See the Setup Guide.
3

Add Memory to Agent

The agent now has auto-generated memory tools:
  • search_memory() - Find relevant information from past conversations
  • save_memory() - Store new information for later retrieval
  • get_entity_context() - Get comprehensive context about specific entities (when entity extraction is enabled)
All tool executions are automatically logged when track_tools=True, creating a complete history of what your agent has done.

Automatic Query Tracking & Augmentation

Wrap your runner to automatically track user queries and augment them with relevant historical context:

What This Does

When augment_queries=True (configured in Ryumem instance):
  1. Tracks user queries as episodes automatically
  2. Finds similar past queries using semantic search
  3. Augments new queries with context from similar past conversations
  4. Links queries to tool executions hierarchically
Query augmentation helps agents learn from past interactions. If a user asks “What’s the weather in London?” and later asks “How about London today?”, the second query gets enriched with context from the first.

Configuration Options

All configuration is done when initializing the Ryumem instance:
This creates a complete audit trail of:
  • Which tools were called
  • What parameters were used
  • What results were returned
  • When they were executed
Perfect for debugging, analytics, and improving agent performance over time.

Complete Example

See a full working example in the repository:

Password Guessing Game

Advanced demo showing how query augmentation helps agents learn

Basic Usage

Basic example with memory and search

API Reference

add_memory_to_agent()

Adds memory tools to a Google ADK agent. Parameters:
  • agent - The Google ADK Agent instance
  • ryumem_instance - Initialized Ryumem instance (all configuration comes from this)
Returns:
  • The same agent instance (modified in-place with memory tools)
Note: Configuration options like track_tools, extract_entities, etc. are set when initializing the Ryumem instance, not when calling this function.

wrap_runner_with_tracking()

Wraps a Google ADK Runner to track queries and optionally augment them with history. Parameters:
  • original_runner - Google ADK Runner instance
  • agent_with_memory - Agent that has been enhanced with add_memory_to_agent()
Returns:
  • The same runner instance (modified in-place with tracking)
Note: Configuration options like augment_queries, similarity_threshold, top_k_similar are set when initializing the Ryumem instance.