adk-memory
Semantic memory and search for Rust Agent Development Kit (ADK-Rust) agents.
Overview
adk-memory provides long-term memory capabilities for the Rust Agent Development Kit (ADK-Rust):
- InMemoryMemoryService - Simple in-memory memory storage
- Semantic Search - Query memories by content similarity
- Memory Entries - Structured memory with metadata
- Automatic Injection - Memory context added to agent prompts
Installation
[]
= "0.1.8"
Or use the meta-crate:
[]
= { = "0.1.8", = ["memory"] }
Quick Start
use InMemoryMemoryService;
use MemoryEntry;
// Create memory service
let service = new;
// Add a memory
service.add_memory.await?;
// Search memories
let results = service.search_memory.await?;
Memory in Agents
Memory is automatically searched when configured:
let agent = new
.model
.include_memory // Include top 5 relevant memories
.build?;
The runner automatically injects relevant memories into the agent's context.
Memory Entry Structure
Features
- Per-user memory isolation
- Metadata filtering
- Timestamp-based ordering
- Pluggable storage backends
Related Crates
- adk-rust - Meta-crate with all components
- adk-core - Core
Memorytrait - adk-runner - Memory injection during execution
License
Apache-2.0
Part of ADK-Rust
This crate is part of the ADK-Rust framework for building AI agents in Rust.