Context and Memory
How RA-H automatically provides context to AI agents
One-liner: RA-H automatically gives agents your 10 most-connected nodes as background context, plus Agent mode has persistent memory across sessions.
How It Works
When you chat with RA-H, the AI doesn't start from scratch. It automatically receives:
- Base context - Understanding of nodes, edges, dimensions, and tools
- Auto-context - Your 10 most-connected knowledge hubs
- Focused node - Whatever you're currently looking at
- Agent memory - (Agent mode only) Persistent memory from past sessions
Auto-Context System
What It Does
Auto-context provides your top 10 most-connected nodes as background awareness to every conversation. These are your knowledge hubs—nodes with the most edge connections to other content.
Why Connections Matter
Nodes with many edges are typically:
- Core concepts that relate to many things
- Active projects you've linked extensively
- Important frameworks that inform your thinking
- Key people or resources referenced across your work
By using edge count, RA-H automatically surfaces what's actually important in your graph without you having to curate anything.
What Agents See
=== BACKGROUND CONTEXT ===
Top 10 most-connected nodes (important knowledge hubs)
[NODE:123:"Your Core Project"] (edges: 47)
[NODE:456:"Key Framework"] (edges: 32)
[NODE:789:"Important Concept"] (edges: 28)
...
Agents see just the ID and title—enough to know what's important. If they need more detail, they use queryNodes or getNodesById to retrieve full content.
Toggle Auto-Context
You can enable/disable auto-context in Settings → Context.
When enabled (default), every conversation includes your top connected nodes automatically.
Agent Memory (Agent Mode Only)
Agent mode maintains persistent memory across sessions in a local file:
Location: ~/Library/Application Support/RA-H/agent-memory.md
What Gets Remembered
The agent decides what's worth remembering, typically:
- Your preferences and working patterns
- Project context and goals
- Important findings and insights
- Key decisions and their rationale
Memory Tools
| Tool | Purpose |
|---|---|
readMemory | Read current memory contents |
updateMemory | Append new information to memory |
Viewing Memory
Open Settings → Memory to view the current contents of your agent's memory.
Context Flow
┌─────────────────────────────────────────────────┐
│ Your Message │
└──────────────────────┬──────────────────────────┘
▼
┌─────────────────────────────────────────────────┐
│ Context Assembly │
│ ┌─────────────┐ ┌─────────────┐ ┌──────────┐ │
│ │Base Context │ │Auto-Context │ │ Focused │ │
│ │(how RA-H │ │(top 10 by │ │ Node │ │
│ │ works) │ │edge count) │ │ │ │
│ └─────────────┘ └─────────────┘ └──────────┘ │
│ ┌──────────────┐ │
│ │Agent Memory │ (Agent only) │
│ └──────────────┘ │
└──────────────────────┬──────────────────────────┘
▼
┌─────────────────────────────────────────────────┐
│ AI Agent │
│ Has context + can use tools for more detail │
└─────────────────────────────────────────────────┘
Growing Your Context Automatically
The beauty of auto-context is that as you use RA-H, your context naturally improves:
- Create nodes about important concepts
- Create edges connecting related ideas
- The most-connected nodes automatically surface as context
There's nothing to configure or maintain. The nodes that matter most naturally rise to the top.
Privacy
Everything is local. Context assembly happens entirely on your machine. Your nodes, edges, memory, and conversation history never leave your device unless you explicitly share them.