SkillAgentSearch skills...

agent-memory-rs

Comprehensive memory management system for LLM agents implementing episodic, semantic. Built in Rust with MCP server support for Kiro CLI

Install / Use

claude mcp add kensave -- npx -y github:kensave/agent-memory-rs

If the server publishes to npm under a different name, use that package instead โ€” check the repo README.

About this skill
๐Ÿ”Œ

MCP Server

Model Context Protocol server

Quality Score

78/100

Supported Platforms

Claude Code
Claude Desktop

Our assessment of agent-memory-rs

agent-memory-rs scores 78/100 on our quality scale, 801st of 957 AI & Machine Learning skills we index.

Its MCP Server is 18 KB long, well organised into 72 sections with 28 code examples: a thorough specification that gives an agent plenty to work with.

It has 3 GitHub stars, so there is little community track record yet; judge it on its content.

Substance
30/30
Structure
20/20
Description
15/15
Adoption
3/20
Freshness
11/15

Maintenance, license and trust

  • The repository was last updated about 7 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.
  • Our last check on 2026-09-23 found the source still online.
  • No license is declared. By default that means all rights are reserved: you can read it, but reusing or redistributing it is not clearly permitted. Ask the author before building on it commercially.
  • Its trust signals score 74/100, with 3 cautions from licensing, adoption, age or documentation. These come from repository metadata, not a code audit โ€” read the skill file before letting an agent act on it.

Safety scan

No issues found

Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful.

AI review by kimi-k2.7-code on 2026-10-11. Automated pattern scan on 2026-10-11. It catches known dangerous patterns, not every risk โ€” read a skill before letting an agent act on it.

agent-memory-rs compared with similar skills

All 4 of these similar skills score higher than agent-memory-rs; compare them before choosing.

SkillScoreStarsUpdatedFormat
agent-memory-rs (this skill)by kensave7837mo agoMCP Server
claude-memby thedotmack100119.5ktodayCLAUDE.md
Agent-Reachby Panniantong100114.5ktodayCLAUDE.md
Understand-Anythingby Egonex-AI10094.1ktodayCLAUDE.md
hyperframesby heygen-com10089.4ktodayCLAUDE.md

Frequently asked questions

How do I install agent-memory-rs?
Run claude mcp add kensave -- npx -y github:kensave/agent-memory-rs. The install tabs above show the steps for each supported agent.
Which AI agents does agent-memory-rs work with?
It is written for Claude Code and Claude Desktop, as a MCP Server file. Other agents that read the same format can often use it too.
Is agent-memory-rs safe to use?
Our scan of the whole file found no instruction hijacking, hidden characters, credential access, data exfiltration or destructive commands. An AI review of the same text found nothing harmful. It declares no license and scores 74/100 on trust signals. Skills are instructions an agent will follow, so read the file before installing it and do not approve commands you do not understand.
Is agent-memory-rs still maintained?
The repository was last updated about 7 months ago. That is recent enough to be usable, but agent tooling moves fast, so check the instructions against your agent's current version.

Agent Memory RS

<p align="center"> <img src="logo.png" alt="Agent Memory RS Logo" width="300"/> </p>

Episodic memory system for AI agents with vector search, exposed via MCP server.

Verified Performance: 65.9% R@10 on LoCoMo benchmark โ€ข Up to 74% on long conversations

Note: This project was developed using Kiro CLI - an AI-powered development assistant.

Rust License

Overview

Agent Memory RS stores interaction episodes with vector embeddings and retrieves them using cosine similarity search. Exposed as an MCP server with learn and search tools.

Features

  • Episode Storage โ€” Events stored with vector embeddings (BGE-Small, 384 dims)
  • Vector Search โ€” Cosine distance retrieval on episode embeddings
  • BM25 Search โ€” Keyword search with proper IDF calculation
  • MCP Server โ€” Learn and search tools via Model Context Protocol (stdio + HTTP)
  • Workspace Isolation โ€” Separate SQLite databases per workspace (~/.memory-rs/workspaces/)
  • Multiple Models โ€” BGE-Small (default), Nomic (long context), MiniLM (fastest)
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚       MCP Client        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
            โ”‚ stdio (JSON-RPC)
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚      MCP Server         โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”‚
โ”‚  โ”‚  learn  โ”‚ โ”‚ search โ”‚ โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜ โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”˜
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   EpisodicMemoryStore   โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”‚
โ”‚  โ”‚ SQLite + vec0     โ”‚   โ”‚
โ”‚  โ”‚ (episodes table)  โ”‚   โ”‚
โ”‚  โ”‚ (vector index)    โ”‚   โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿš€ Quick Start

Installation

git clone https://github.com/yourusername/agent-memory-rs
cd agent-memory-rs
cargo build --release

MCP Server (Recommended)

# Start the server
./target/release/agent-memory-mcp my-workspace

Configure your AI assistant:

{
  "mcpServers": {
    "agent-memory": {
      "command": "/path/to/agent-memory-mcp",
      "args": ["my-workspace"],
      "env": {
        "MEMORY_MODEL": "bge"
      }
    }
  }
}

Configuration Options:

| Environment Variable | Values | Default | Description | |---------------------|--------|---------|-------------| | MEMORY_MODEL | bge, nomic, minilm | bge | Embedding model to use |

Model Selection:

  • bge (BGE-Small) - Best quality/speed balance, 384 dims, ~33MB โญ Recommended
  • nomic (Nomic Embed) - Best for long context (8K tokens), 768 dims, ~138MB
  • minilm (MiniLM) - Fastest, 384 dims, ~23MB

Available MCP Tools:

  • @memory/learn - Store new memories
  • @memory/search - Search across all memory types

Remote Access (HTTP)

Run the MCP server as a standalone HTTP service to share memory across devices on your network:

# Start HTTP server
./target/release/agent-memory-mcp --http 0.0.0.0:8230 my-workspace

Any MCP client that supports HTTP transport can connect directly:

{
  "mcpServers": {
    "agent-memory": {
      "url": "http://server-ip:8230/mcp"
    }
  }
}

This is useful when you want a single memory database shared across multiple machines โ€” run the server on one device (e.g. a Raspberry Pi or home server) and connect from anywhere on your network.

For environments without native HTTP MCP support, a agent-memory-proxy binary is included that bridges stdio โ†” HTTP:

{
  "mcpServers": {
    "agent-memory": {
      "command": "/path/to/agent-memory-proxy",
      "args": ["--remote", "http://server-ip:8230/mcp"]
    }
  }
}

Data Storage

Workspace Isolation: Each workspace has its own isolated database. Memories are NOT shared between workspaces.

Database Location:

~/.memory-rs/workspaces/
โ”œโ”€โ”€ prime-sde-workspace/
โ”‚   โ””โ”€โ”€ memory.db          # All memories for this workspace
โ”œโ”€โ”€ my-project/
โ”‚   โ””โ”€โ”€ memory.db          # Separate isolated memories
โ””โ”€โ”€ default/
    โ””โ”€โ”€ memory.db          # Default workspace

Workspace Naming:

  • Specified in MCP server args: ["workspace-name"]
  • If no arg provided, auto-generates from current directory: <hash>-<dirname>
    • Example: /path/to/workspace/myproject โ†’ a1b2c3d4-myproject
    • Hash ensures uniqueness across different paths with same directory name
  • Falls back to "default" if directory name unavailable

Data Persistence:

  • โœ… Survives Kiro restarts (stored in home directory)
  • โœ… Survives repo deletion (not stored in repo)
  • โŒ Deleting ~/.memory-rs/ loses all memories
  • โŒ No cross-workspace knowledge sharing (by design)

Model Cache: Models are downloaded once and cached in the standard HuggingFace cache:

~/.cache/huggingface/hub/
โ”œโ”€โ”€ models--BAAI--bge-small-en-v1.5/
โ”œโ”€โ”€ models--nomic-ai--nomic-embed-text-v1/
โ””โ”€โ”€ models--sentence-transformers--all-MiniLM-L6-v2/

CLI Usage

# Create workspace
cargo run --bin agent-memory-cli workspace create --name my-project --path /path/to/project

# List workspaces
cargo run --bin agent-memory-cli workspace list

# Store episode
cargo run --bin agent-memory-cli store --workspace 1 --type user_query --context "How do I use Rust?" --outcome "Provided tutorial" --valence 0.8

# Query memories
cargo run --bin agent-memory-cli query --workspace 1 "rust programming" --limit 10

# Check system health
cargo run --bin agent-memory-cli stats --workspace 1

Programmatic Usage

use agent_memory_rs::services::MemoryManager;
use agent_memory_rs::storage::Database;

// Initialize
let db = Database::new("memory.db")?;
let manager = MemoryManager::new(db.clone());

// Store episode
manager.store_episode(
    1, // workspace_id
    "user_query",
    serde_json::json!({"query": "How do I use Rust?"}),
    Some("Provided Rust tutorial"),
    Some(0.8), // positive valence
)?;

// Search memories
let results = manager.retrieve("rust programming", 1, 10)?;

๐Ÿ“š Documentation

๐ŸŽ“ Agent Skill

The repository includes a skill for AI agents using Kiro CLI:

Location: skill/agent-memory/SKILL.md

Add to your agent configuration:

{
  "resources": [
    "skill:///path/to/agent-memory-rs/skill/agent-memory/SKILL.md"
  ]
}

What the skill provides:

  • When to use @memory/learn vs @memory/search
  • Best practices for memory management
  • Importance scoring and tagging strategies
  • Workflow patterns for common scenarios
  • Configuration options and troubleshooting

The skill is loaded on-demand, providing guidance only when needed without consuming context at startup.

๐Ÿ—๏ธ Architecture

MemoryManager (Facade)
    โ”œโ”€โ”€ EpisodicMemoryStore      - Raw interaction events
    โ””โ”€โ”€ HybridRetrievalEngine    - BM25 + Vector search

Built with SOLID principles:

  • Core traits (MemoryStore, MemoryRetriever, EmbeddingService)
  • Dependency injection throughout
  • Thread-safe Database pattern: Arc<Mutex<Connection>>

๐Ÿงช Testing

# Run all tests
cargo test

# Run integration tests only
cargo test --test '*'

# Run with output
cargo test -- --nocapture

Test Coverage: 29 tests covering full lifecycle

๐Ÿ“Š Performance

  • Episode Storage: ~5ms
  • Hybrid Search: ~20ms (10k memories)

๐Ÿ”ฌ Research Foundation

Based on modern AI agent memory research:

  1. Memory Management for Long-Running Agents (2025, arXiv:2509.25250v1)
  2. Episodic Memory for RAG (2024, arXiv:2511.07587v1)
  3. MIRIX Multi-Agent Memory (2024)
  4. Episodic Memory Properties (2025, arXiv:2502.06975v1)
  5. Procedural Memory Is Not All You Need (2025, arXiv:2505.03434v1)

See Design Rationale for complete references.

๐Ÿ› ๏ธ Technology Stack

  • Language: Rust 1.70+
  • Database: SQLite with sqlite-vec extension
  • Embeddings: BERT MiniLM (384 dimensions) via Candle
  • Vector Search: Cosine distance with HNSW-like indexing
  • Interface: MCP (Model Context Protocol)

๐Ÿ“ License

Licensed under either of:

at your option.

๐Ÿค Contributing

Contributions welcome! Please read our contributing guidelines first.

๐Ÿ™ Acknowledgments

Inspired by cognitive science research on human memory systems and modern AI agent architectures.

Prune old memories

memory-cli prune --workspace 1 --dry-run


## ๐Ÿงช Testing

```bash
# Run all tests
cargo test

# Run integration tests only
cargo test --test '*'

# Run with output
cargo test -- --nocapture

Test Coverage: 29 tests covering full lifecycle

๐Ÿ”ง Development

Project Structure

src/
โ”œโ”€โ”€ services/          # 6 core services
โ”œโ”€โ”€ storage/           # Database and memory store
โ”œโ”€โ”€ traits/            # 5 SOLID traits
โ”œโ”€โ”€ models/            # DTOs and types
โ”œโ”€โ”€ cli/               # CLI commands
โ””โ”€โ”€ mcp/               # MCP server

tests/                 # 16 integration test files
docs/                  # 5 documentation files

Building

# Development build
cargo build

# Release build (optimized)
cargo build --release

# Build MCP server only
cargo build --bin memory-rs-mcp --release

๐Ÿ“Š Performance

  • Episode storage: ~5ms
  • Hybrid search: ~20ms (1000 memories)
  • All operations: Non-blocking

๐Ÿค Contributing

  1. Follow SOLID principles
  2. Write minimal, focused code
  3. Add tests for new features
  4. Update documentation
  5. Run cargo test before committing

๐Ÿ“ License

MIT OR Apache-2.0

๐Ÿ™ Acknowledgments

Built with:

  • Rust ๐Ÿฆ€
  • SQLite + sqlite-vec
  • Candle (ML framework)
  • MCP Protocol

Status: Production-ready โœ… Tests: 44 passing โœ… Documentation: Complete โœ… }


#### Search (Query Memories)

```json
{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "tools/call",
  "params": {
    "name": "search",
    "arguments": {
      "query": "programming languages",
      "workspace_id": 1,
      "limit": 5
    }
  }
}

Response:

{
  "jsonrpc": "2.0",
  "id": 2,
  "result": {
    "results": [
      {
        "memory_id": 42,
        "text": "Rust is a systems programming language...",
        "similarity_score": 0.92,
        "combined_score": 0.88,
        "importance_score": 0.8,
        "tags": "rust,programming",
        "created_at": "2026-01-30T22:00:00Z"
      }
    ],
    "count": 1
  }
}

๐Ÿ“š Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                         CLI Tool                             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                           โ”‚ stdio (JSON-RPC 2.0)
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                      MCP Server                              โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                     โ”‚
โ”‚  โ”‚  Learn Tool    โ”‚  โ”‚  Search Tool   โ”‚                     โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                     โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
            โ”‚                  โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    Memory System                             โ”‚
โ”‚  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”                โ”‚
โ”‚  โ”‚  FastEmbedder    โ”‚  โ”‚  Memory Store    โ”‚                โ”‚
โ”‚  โ”‚  (MiniLM/Nomic)  โ”‚  โ”‚  (SQLite+vec)    โ”‚                โ”‚
โ”‚  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
            โ”‚                  โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚              Workspace Manager                               โ”‚
โ”‚  ~/.memo

Truncated for display โ€” read the full file on GitHub.

Related Skills

View on GitHub
GitHub Stars3
CategoryAI
Updated7mo ago
Forks0

Languages

Rust

Trust signals

74/100

From repository metadata: license, adoption, age and documentation. Not a code audit โ€” see the Safety scan above for what the skill file itself contains.

1 medium2 low
agent-memory-rs โ€” MCP Server: Install & Safety Check | SkillAgent