← Back to Plugins
Tools

Memory Littleguy

mferraznw By mferraznw 👁 47 views ▲ 0 votes

OpenClaw plugin: LittleGuy knowledge graph as persistent long-term memory for AI agents

GitHub

Install

npm install memory-littleguy

Configuration Example

{
  "plugins": {
    "memory-littleguy": {
      "apiKey": "lgk_your_api_key_here",
      "baseUrl": "https://mcp.littleguy.app",
      "autoRecall": true,
      "autoCapture": false,
      "cacheTurnsEnabled": true,
      "recallFromCache": true,
      "topicDriftEnabled": true
    }
  }
}

README

# memory-littleguy โ€” Persistent Memory for OpenClaw Agents

> *"Your agent always knows everything relevant โ€” across every surface you use."*

**memory-littleguy** is an [OpenClaw](https://openclaw.ai) plugin that gives your agent persistent, structured long-term memory powered by [LittleGuy](https://littleguy.app) โ€” a self-organizing knowledge graph that turns raw conversation turns into real human context.

Built and used daily by **Gideon**, Mark Ferraz's personal AI agent running on OpenClaw.

---

## Why This Exists

OpenClaw agents wake up fresh every session. They forget everything โ€” decisions, preferences, project context, relationships. That's a problem when your agent is managing sprints, coordinating across tools, or acting with genuine intent on your behalf.

**memory-littleguy** solves this by bridging OpenClaw's lifecycle hooks to LittleGuy's knowledge graph, giving your agent:

- **Automatic recall** โ€” relevant memories injected into context *before* the agent runs
- **Automatic capture** โ€” user and assistant turns persisted silently after each interaction
- **Compaction safety net** โ€” full session summaries dumped to LittleGuy before context compaction, so nothing is truly lost
- **Topic-aware recall** โ€” smart topic drift detection (local heuristics + server-side semantic embeddings) to avoid redundant searches
- **Cross-session continuity** โ€” a turn cache that bridges conversations across clients, channels, and sessions

## What Makes LittleGuy Different

LittleGuy isn't another vector store with chat history dumped in. It's a **structured knowledge graph** with:

- **Human-like temporal decay** โ€” older, less-reinforced knowledge fades naturally
- **Episodic + semantic + procedural memory** โ€” not just "what was said" but decisions, patterns, and learned procedures
- **De-duplication and incremental injection** โ€” no redundant context bloat
- **User-issuable API keys** โ€” your entire agent stack can talk to it programmatically
- **Visual knowledge graph** โ€” view, interact with, and refine your agent's memory
- **OAuth MCP server** โ€” extensive tool surface for any MCP-compatible client

**Currently completely free** at [littleguy.app](https://littleguy.app).

---

## Installation

### 1. Install the plugin

```bash
# From npm (when published)
npm install memory-littleguy

# Or clone directly
git clone https://github.com/mferraznw/memory-littleguy.git
```

### 2. Add to your OpenClaw config

In your `openclaw.json` (or via the OpenClaw dashboard):

```json
{
  "plugins": {
    "memory-littleguy": {
      "apiKey": "lgk_your_api_key_here",
      "baseUrl": "https://mcp.littleguy.app",
      "autoRecall": true,
      "autoCapture": false,
      "cacheTurnsEnabled": true,
      "recallFromCache": true,
      "topicDriftEnabled": true
    }
  }
}
```

### 3. Get your API key

Sign up at [littleguy.app](https://littleguy.app), create a LittleGuy, and generate an API key from your dashboard.

---

## Configuration

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `apiKey` | string | *required* | Your LittleGuy API key (`lgk_...`) |
| `baseUrl` | string | `https://mcp.littleguy.app` | LittleGuy API endpoint |
| `autoRecall` | boolean | `true` | Inject relevant memories before each agent turn |
| `autoCapture` | boolean | `false` | Capture significant content to long-term graph memory |
| `cacheTurnsEnabled` | boolean | `true` | Write every turn into continuity cache |
| `recallFromCache` | boolean | `true` | Inject recent cross-session turns on start |
| `topicDriftEnabled` | boolean | `true` | Use server-side topic drift for smarter recall |
| `topicDriftUseEmbeddings` | boolean | `true` | Semantic embedding support for topic comparison |
| `recallTopK` | number | `8` | Max memories injected per turn |
| `recallMinScore` | number | `0.35` | Minimum relevance score for recall |
| `recentTurnsLimit` | number | `150` | Cached turns injected on session start |
| `excludeCurrentConversationFromCache` | boolean | `true` | Skip current conversation when hydrating cache |
| `topicSimilarityThreshold` | number | `0.38` | Skip recall when topic similarity exceeds this |
| `topicRecallStaleMs` | number | `21600000` | Force fresh recall after 6 hours even if topic unchanged |

---

## Agent Tools

The plugin registers these tools for your agent to use directly:

| Tool | Purpose |
|------|---------|
| `littleguy_unified_search` | Search across knowledge graph, living memory, and messages |
| `littleguy_topic_drift` | Check if current topic warrants fresh recall |
| `littleguy_recent_turns` | Quick scan of recent cached turns |
| `littleguy_capture` | Manually store a thought, decision, or fact |
| `littleguy_probe` | Connectivity and write-path diagnostics |
| `littleguy_search` | Legacy compatibility wrapper |

---

## How It Works

```
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    OpenClaw Agent                     โ”‚
โ”‚                                                       โ”‚
โ”‚  before_agent_start โ”€โ”€โ–บ Topic Drift Check             โ”‚
โ”‚         โ”‚                    โ”‚                        โ”‚
โ”‚         โ”‚              [drift detected?]              โ”‚
โ”‚         โ”‚                yes โ”‚ no                     โ”‚
โ”‚         โ”‚                 โ”‚   โ””โ”€โ”€ skip recall         โ”‚
โ”‚         โ–ผ                 โ–ผ                           โ”‚
โ”‚   Hydrate Cache    Unified Search                    โ”‚
โ”‚   (recent turns)   (knowledge graph)                 โ”‚
โ”‚         โ”‚                 โ”‚                           โ”‚
โ”‚         โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜                           โ”‚
โ”‚                  โ–ผ                                    โ”‚
โ”‚         Inject into system prompt                    โ”‚
โ”‚         (de-duped, incremental)                      โ”‚
โ”‚                                                       โ”‚
โ”‚  โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•              โ”‚
โ”‚                                                       โ”‚
โ”‚  agent_end โ”€โ”€โ–บ Cache turns to LittleGuy              โ”‚
โ”‚         โ”‚โ”€โ”€โ–บ Auto-capture significant content        โ”‚
โ”‚                                                       โ”‚
โ”‚  before_compaction โ”€โ”€โ–บ Dump session summary           โ”‚
โ”‚                        (nothing is lost)              โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
```

---

## Real-World Usage

This plugin powers **Gideon**, an OpenClaw agent that manages:

- Sprint planning and release coordination (Govern365 v1)
- Email monitoring across Gmail and M365 accounts
- Calendar and contact management
- Sub-agent orchestration for coding, research, and ops
- Proactive heartbeat checks and daily briefings
- Voice interaction via GideonTalk (Swift menu bar app)

Gideon uses LittleGuy to remember decisions, track project context, maintain relationship history, and provide continuity across hundreds of sessions โ€” without ever losing critical context to compaction.

---

## About

**Author:** Mark Ferraz ([@mferraznw](https://github.com/mferraznw))  
**Agent:** Gideon (OpenClaw AI familiar)  
**Company:** [SolutionsMark](https://solutionsmark.com)

Senior Technical Director with 25+ years in Microsoft 365. Co-authored Microsoft Press books on SharePoint. Building AI-native systems on top of structured memory for enterprise governance.

**LittleGuy** โ€” [littleguy.app](https://littleguy.app) โ€” A second brain for agents.  
**OpenClaw** โ€” [openclaw.ai](https://openclaw.ai) โ€” The agent platform.

---

## License

MIT
tools

Comments

Sign in to leave a comment

Loading comments...