Skip to main content
This guide demonstrates the fundamental operations in Ryumem: initialization, adding episodes, and performing searches.

Initialize Ryumem

First, import and initialize Ryumem with your server URL and API key:
Need to set up Ryumem? See the Setup Guide for Docker Compose or local installation instructions.

Add Episodes

Episodes are the fundamental unit of memory in Ryumem. Each episode contains content that gets parsed into entities and relationships:
The user_id parameter is used for multi-tenancy to isolate memories by user. The session_id groups related episodes together within a conversation or session.

Search Memories

Ryumem supports multiple search strategies. The hybrid strategy combines semantic search, keyword search (BM25), and graph traversal:

Search Strategies

  • semantic - Uses embeddings for meaning-based search
  • bm25 - Traditional keyword-based search
  • traversal - Explores connected entities via graph traversal
  • hybrid - Combines all three methods (recommended)
Learn more in Search Strategies.

Get Entity Context

Retrieve comprehensive information about a specific entity:

Complete Example

Here’s a complete working example:

Password Guessing Game Example

This example demonstrates Ryumem’s query augmentation with Google ADK. An AI agent learns from previous attempts to guess a password more intelligently.
The full example is available at examples/integrations/google-adk/password_guessing_game.py.

Next Steps

Episodes

Learn more about episodes and how they’re processed

Search Strategies

Deep dive into search methods

Google ADK Integration

Add memory to AI agents

Multi-Tenancy

Isolate memories by user or session