githubinferredactive
pensyve
provenance:github:major7apps/pensyve
WHAT THIS AGENT DOES
Pensyve helps AI assistants remember past conversations and actions, allowing them to provide more personalized and consistent responses over time. It solves the common problem of AI agents "forgetting" what they've already learned or been told, leading to frustrating repetition and irrelevant suggestions. Business professionals, customer service teams, and anyone building AI-powered tools will benefit from Pensyve's ability to create more helpful and reliable AI interactions.
README

# Pensyve
[](https://github.com/major7apps/pensyve/actions/workflows/ci.yml)
[](LICENSE)
[](https://www.python.org/downloads/)
[](https://www.rust-lang.org/)
Universal memory runtime for AI agents. Framework-agnostic, protocol-native, offline-first.
### Without memory
```
User: "I prefer dark mode and use vim keybindings"
Agent: "Got it!"
[next session]
User: "Update my editor settings"
Agent: "What settings would you like to change?"
User: "I ALREADY TOLD YOU"
```
### With Pensyve
```python
# Session 1 — agent stores the preference
p.remember(entity=user, fact="Prefers dark mode and vim keybindings", confidence=0.95)
# Session 2 — agent recalls it automatically
memories = p.recall("editor settings", entity=user)
# → [Memory: "Prefers dark mode and vim keybindings" (score: 0.94)]
```
Your agent stops being amnesiac. Decisions, patterns, and outcomes persist across sessions — and the right context surfaces when it's needed.
## Why Pensyve
| What you need | How Pensyve solves it |
| ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| Agent forgets everything between sessions | **Three memory types** — episodic (what happened), semantic (what is known), procedural (what works) |
| Agent can't find the right memory | **8-signal fusion retrieval** — vector similarity + BM25 + graph + intent + recency + frequency + confidence + type boost |
| Agent repeats failed approaches | **Procedural memory** — Bayesian tracking on action→outcome pairs surfaces what actually works |
| Memory store grows unbounded | **FSRS forgetting curve** — memories you use get stronger, unused ones fade naturally. Consolidation promotes repeated facts. |
| Need cloud signup to get started | **Offline-first** — SQLite + ONNX embeddings. Works on your laptop right now. No API keys needed. |
| Need to scale to production | **Postgres backend** — feature-gated pgvector for multi-node deployments. Managed service at pensyve.com. |
| Only works with one framework | **Framework-agnostic** — Python, TypeScript, Go, MCP, REST, CLI. Drop-in adapters for LangChain, CrewAI, AutoGen. |
## Install
```bash
pip install pensyve # Python (PyPI)
npm install pensyve # TypeScript (npm)
go get github.com/major7apps/pensyve/pensyve-go@latest # Go
```
Or use the MCP server directly with Claude Code, Cursor, or any MCP client — see [MCP Setup](https://pensyve.com/docs/getting-started/mcp-setup).
## Quick Start
```bash
pip install pensyve
```
### Episode: your agent remembers a conversation
```python
import pensyve
p = pensyve.Pensyve()
user = p.entity("user", kind="user")
# Record a conversation — Pensyve captures it as episodic memory
with p.episode(user) as ep:
ep.message("user", "I prefer dark mode and use vim keybindings")
ep.message("agent", "Got it — I'll remember your editor preferences")
ep.outcome("success")
# Later (even in a new session), the agent recalls what happened
results = p.recall("editor preferences", entity=user)
for r in results:
print(f"[{r.score:.2f}] {r.content}")
```
### Remember: store an explicit fact
```python
p.remember(entity=user, fact="Prefers Python over JavaScript", confidence=0.9)
```
### Procedural: the agent learns what works
```python
# After a debugging session that succeeded:
ep.outcome("success")
# Pensyve tracks action→outcome reliability with Bayesian updates.
# Next time a similar issue comes up, recall surfaces the approach that worked.
```
### Consolidate: memories stay clean
```python
p.consolidate()
# Promotes repeated episodic facts to semantic knowledge
# Decays memories you never access via FSRS forgetting curve
```
### Building from source
<details>
<summary>Prerequisites and build steps</summary>
- Rust 1.88+, Python 3.10+ with [uv](https://github.com/astral-sh/uv)
- Optional: [Bun](https://bun.sh) (TypeScript SDK), [Go 1.21+](https://go.dev) (Go SDK)
```bash
git clone https://github.com/major7apps/pensyve.git && cd pensyve
uv sync --extra dev
uv run maturin develop --release -m pensyve-python/Cargo.toml
uv run python -c "import pensyve; print(pensyve.__version__)"
```
</details>
## Interfaces
Pensyve exposes its core engine through multiple interfaces — use whichever fits your stack.
### Python SDK
Direct in-process access via PyO3. Zero network overhead.
```python
import pensyve
p = pensyve.Pensyve(namespace="my-agent")
entity = p.entity("user", kind="user")
# Remember a fact
p.remember(entity=entity, fact="User prefers Python", confidence=0.95)
# Recall memories
results = p.recall("programming language", entity=entity)
# Record an episode
with p.episode(entity) as ep:
ep.message("user", "Can you fix the login bug?")
ep.message("agent", "Fixed — the session token was expiring early")
ep.outcome("success")
# Consolidate (promote repeated facts, decay unused memories)
p.consolidate()
```
### MCP Server
Works with Claude Code, Cursor, and any MCP-compatible client.
```bash
cargo build --release --bin pensyve-mcp
```
```json
{
"mcpServers": {
"pensyve": {
"command": "./target/release/pensyve-mcp",
"env": { "PENSYVE_PATH": "~/.pensyve/default" }
}
}
}
```
**Tools exposed:** `recall`, `remember`, `episode_start`, `episode_end`, `forget`, `inspect`, `status`, `account`
### Claude Code Plugin
Full cognitive memory layer for Claude Code with 6 commands, 4 skills, 2 agents, and 4 lifecycle hooks.
**Pensyve Cloud** (no build required):
```
/plugin marketplace add /path/to/pensyve/integrations/claude-code
/plugin install pensyve@pensyve
```
Then set your API key (environment variable or inline in `.claude/settings.json`):
```bash
export PENSYVE_API_KEY="your-api-key-here"
```
Or add it directly to your `.claude/settings.json`:
```json
{
"mcpServers": {
"pensyve": {
"url": "https://mcp.pensyve.com/mcp",
"env": {
"PENSYVE_API_KEY": "your-api-key-here"
}
}
}
}
```
**Pensyve Local** (self-hosted, no API key needed):
Build the MCP binary first (see [Install](#install)), then override the MCP config in your `.claude/settings.json`:
```json
{
"mcpServers": {
"pensyve": {
"command": "pensyve-mcp",
"args": ["--stdio"]
}
}
}
```
```
Plugin contents:
├── 6 slash commands /remember, /recall, /forget, /inspect, /consolidate, /memory-status
├── 4 skills session-memory, memory-informed-refactor, context-loader, memory-review
├── 2 agents memory-curator (background), context-researcher (on-demand)
└── 4 hooks SessionStart, Stop, PreCompact, UserPromptSubmit
```
See [`integrations/claude-code/README.md`](integrations/claude-code/README.md) for full documentation.
### REST API
Rust/Axum gateway serving REST + MCP with auth, rate limiting, and usage metering.
```bash
cargo build --release --bin pensyve-mcp-gateway
./target/release/pensyve-mcp-gateway # listens on 0.0.0.0:3000
```
```bash
# Remember
curl -X POST http://localhost:3000/v1/remember \
-H "Content-Type: application/json" \
-d '{"entity": "seth", "fact": "Seth prefers Python", "confidence": 0.95}'
# Recall
curl -X POST http://localhost:3000/v1/recall \
-H "Content-T
[truncated…]PUBLIC HISTORY
First discoveredMar 30, 2026
IDENTITY
inferred
Identity inferred from code signals. No PROVENANCE.yml found.
Is this yours? Claim it →METADATA
platformgithub
first seenMar 18, 2026
last updatedMar 30, 2026
last crawled1 day ago
version—
README BADGE
Add to your README:
