# Vector Memory

> Persistent vector memory for Claude Code via LanceDB. Use when: remembering across sessions, storing lessons, recalling past decisions, maintaining context continuity. Tools: memory_store, memory_recall, memory_update, memory_forget, memory_merge.

- **Type:** Skill
- **Install:** `agentstack add skill-cablate-ai-toolkit-vector-memory`
- **Verified:** Yes — security-reviewed for prompt injection and unsafe behavior
- **Seller:** [cablate](https://agentstack.voostack.com/s/cablate)
- **Installs:** 0
- **Category:** [Agent Skills](https://agentstack.voostack.com/c/agent-skills)
- **Latest version:** 0.1.0
- **License:** MIT
- **Upstream author:** [cablate](https://github.com/cablate)
- **Source:** https://github.com/cablate/ai-toolkit/tree/master/skills/vector-memory

## Install

```sh
agentstack add skill-cablate-ai-toolkit-vector-memory
```

Requires the [AgentStack CLI](https://agentstack.voostack.com/docs/cli). Works with Claude Code, Cursor, and any MCP-compatible agent.

## About

# Vector Memory

Long-term memory that persists across sessions. Store facts, decisions, lessons, preferences — recall them later via semantic search.

Vector memory is a **retrieval layer**, not a source of truth. Files and code are the source of truth; vector memory helps you find relevant context fast.

## References

- [tools-reference.md](references/tools-reference.md) — All MCP tools with full parameter docs
- [retrieval-internals.md](references/retrieval-internals.md) — Hybrid pipeline, Weibull decay model (load when debugging retrieval)

---

## When to Store

| Signal | Category | Example |
|--------|----------|---------|
| User states a preference | `preference` | "I prefer tabs over spaces" |
| A fact is established | `fact` | "The API uses OAuth 2.0 with PKCE" |
| A decision is made with rationale | `decision` | "Chose PostgreSQL over MongoDB because..." |
| A mistake was made and corrected | `lesson` | "CSS not applying → check for syntax errors above" |
| An important entity is introduced | `entity` | "Acme Corp is the client, contact: jane@acme.com" |
| A reusable technique is learned | `skill` | "Remotion animations use interpolate()" |

### When NOT to Store

- Temporary task state (use files)
- Things already in committed code or docs
- Conversation summaries ("today we discussed X") — store the **extracted knowledge**, not the summary
- Obvious facts the user can easily re-state

---

## Memory Hygiene

1. **Short and atomic** — Each memory ` | Agent-private (default) |
| `project:` | Project-scoped |
| `user:` | User-scoped |

```
memory_store(text: "...", scope: "project:acme")
memory_recall(query: "...", scope: "project:acme")
```

---

## Quick Reference

### Store
```
memory_store(text: "...", category: "fact", importance: 0.7)
```

### Recall
```
memory_recall(query: "database migration strategy", category: "decision", limit: 5)
```

Good queries describe the **situation**, not the exact stored text. Vector search finds semantic matches.

### Update
```
memory_update(memoryId: "a0e8d0fb", text: "Updated: now using OAuth 2.1")
```

For `preference` and `entity`, text changes create a new version (supersede) — history is preserved.

### Merge
```
memory_merge(primaryId: "a0e8d0fb", secondaryId: "3c31e862", mergedText: "Combined memory")
```

### Forget
```
memory_forget(memoryId: "a0e8d0fb")
memory_forget(query: "outdated migration plan")
```

### History
```
memory_history(memoryId: "a0e8d0fb", direction: "both")
```

---

## Setup

Requires [`@cablate/memory-lancedb-mcp`](https://www.npmjs.com/package/@cablate/memory-lancedb-mcp) — see [`mcp.example.json`](../../mcp.example.json) for configuration.

## Source & license

This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.

- **Author:** [cablate](https://github.com/cablate)
- **Source:** [cablate/ai-toolkit](https://github.com/cablate/ai-toolkit)
- **License:** MIT

Install and usage instructions live in the source repository linked above.

## Pricing

- **Free** — Free

## Security capabilities

Automated source analysis of v0.1.0 — what this tool can access:

- **Network access:** no
- **Filesystem access:** no
- **Shell / process execution:** no
- **Environment & secrets:** no
- **Dynamic code execution:** no

*"Yes" means the capability is present in the source — more access means more to trust, not that it is unsafe.*


## Versions

- **0.1.0** — security scan: passed — Imported from the upstream source.

## Links

- Listing page: https://agentstack.voostack.com/l/skill-cablate-ai-toolkit-vector-memory
- Seller: https://agentstack.voostack.com/s/cablate
- Browse the marketplace: https://agentstack.voostack.com/browse

---
Listed on AgentStack — the marketplace for AI agent skills and MCP servers. Every listing is security-reviewed. Creators keep 70%.
