Universal memory runtime
for AI agents
Give your agents persistent, cross-session memory that learns and forgets like humans. Multi-signal retrieval, multimodal memory, intelligent extraction, and spaced-repetition decay.
import pensyve
p = pensyve.Pensyve(namespace="my-agent")
user = p.entity("user-1")
p.remember(user, "Prefers TypeScript")
memories = p.recall("language preference")
# => [Memory(fact="Prefers TypeScript", score=0.94)]Memory that actually works
Eight retrieval signals, spaced-repetition forgetting curves, and Bayesian procedural learning — built in Rust for speed.
Cross-Session Memory
SQLite-backed persistence with WAL mode. Memories survive restarts, scale across sessions, and sync across agent instances.
FSRS Memory Decay
Spaced-repetition forgetting curves based on the FSRS algorithm. Memories decay naturally, promoting important knowledge and archiving stale data.
Multi-Signal Retrieval
Fuses 8 retrieval signals — vector similarity, BM25, graph proximity, recency, frequency, confidence, type boost, and cross-encoder reranking.
Procedural Learning
Beta-binomial Bayesian reliability tracking for action-outcome procedures. Agents learn what works and what doesn’t over time.
Entity Graph
Knowledge graph via petgraph with BFS traversal. Connects entities, users, teams, and tools with relationship-aware retrieval scoring.
Multiple Interfaces
Python SDK (PyO3), MCP server (stdio), REST API (FastAPI), TypeScript SDK, CLI, plus OpenClaw/OpenHands, LangChain, CrewAI, and AutoGen adapters.
Multimodal Memory
Image memory via Florence-2 (232MB ONNX) and code memory via UniXcoder (125MB ONNX). Store and retrieve visual and code context alongside text.
Intelligent Extraction
LLM-powered fact, entity, and relation extraction. Automatically structures conversations into queryable knowledge.
Up and running in minutes
Choose your integration: Python, TypeScript, REST API, or MCP.
Python SDK
# Install
pip install pensyve
# Use
import pensyve
p = pensyve.Pensyve(namespace="my-agent")
user = p.entity("user-1")
p.remember(user, "Prefers TypeScript")
memories = p.recall("language preference")TypeScript SDK
import { Pensyve } from "pensyve";
const p = new Pensyve({
baseUrl: "http://localhost:8000",
apiKey: "psy_your_key",
});
await p.remember({
entity: "user-1",
fact: "Prefers TypeScript",
});
const memories = await p.recall(
"language preference"
);REST API
# Remember
curl -X POST http://localhost:8000/v1/remember \
-H "Content-Type: application/json" \
-H "Authorization: Bearer psy_your_key" \
-d '{"entity": "user-1", "fact": "Prefers TypeScript"}'
# Recall
curl -X POST http://localhost:8000/v1/recall \
-H "Authorization: Bearer psy_your_key" \
-d '{"query": "language preference"}'Connect to any AI assistant
claude mcp add --transport http pensyve https://mcp.pensyve.com/mcp --header 'Authorization: Bearer $PENSYVE_API_KEY'gemini mcp add pensyve https://mcp.pensyve.com/mcp --transport http --header 'Authorization: Bearer $PENSYVE_API_KEY'Cursor / VS Code / Windsurf / Claude Desktop
// Add to your editor's MCP settings
{
"mcpServers": {
"pensyve": {
"type": "http",
"url": "https://mcp.pensyve.com/mcp",
"headers": {
"Authorization": "Bearer ${PENSYVE_API_KEY}"
}
}
}
}OpenAI Codex
# Add to ~/.codex/config.toml
[mcp_servers.pensyve]
url = "https://mcp.pensyve.com/mcp"
bearer_token_env_var = "PENSYVE_API_KEY"Built for production
Rust core engine with zero-copy PyO3 bindings. No external database required — SQLite handles storage, FTS5 handles search, ONNX handles embeddings.
pensyve-core (Rust)
|- storage/sqlite.rs SQLite + WAL + FTS5
|- embedding.rs ONNX embeddings (fastembed)
|- vector.rs Cosine similarity search
|- graph.rs Entity graph (petgraph)
|- retrieval.rs 8-signal fusion + reranking
|- decay.rs FSRS forgetting curve
|- consolidation.rs Background "dreaming"
|- procedural.rs Bayesian reliability
|- multimodal.rs Florence-2 + UniXcoder
|- extraction.rs LLM fact extraction
Consumers
|- pensyve-python PyO3 native module
|- pensyve-mcp MCP stdio server
|- pensyve_server FastAPI REST API
|- pensyve-ts TypeScript HTTP SDK
|- pensyve-cli CLI (clap)How pensyve compares
Purpose-built for agent memory, not retrofitted from general-purpose vector databases.
| Feature | Pensyve | Mem0 | Zep | Honcho |
|---|---|---|---|---|
| Memory decay | FSRS curves | None | None | None |
| Retrieval signals | 8 fused | Vector only | Vector + temporal | Vector only |
| Procedural memory | Bayesian | No | No | No |
| Knowledge graph | Built-in | Add-on | No | No |
| Core language | Rust | Python | Go | Python |
| External DB required | No (SQLite) | Yes | Yes | Yes |
| MCP support | Native | No | No | No |
| Agent framework integrations | OpenClaw + LangChain + CrewAI + AutoGen | LangChain | LangChain | None |
| Open source | Yes | Partial | Partial | Yes |
| Multimodal memory | Image + Code | No | No | No |
| LLM extraction | Built-in | No | No | Reasoning only |
| Pricing model | Per-op ($0.002-0.01) | $19-249/mo tiers | Credit-based | Per-query tiers |
Ready to give your agents memory?
Open source, batteries included. Start with 1,000 free operations — text, multimodal, and extraction.