Documentation

Memory Service

Universal AI memory that persists across sessions and integrates with 11 AI CLI tools

← Back to Documentation

Memories are stored locally and can be queried using natural language from any connected AI tool. The Memory Service provides persistent context that flows between all integrated tools.

Core Features

SQLite Database

Local storage at ~/.hive/hive-ai.db

Full-Text Search

FTS5 indexing with Porter stemming

Thematic Clustering

Automatic organization by topic

Multi-Tool Access

Shared across all 11 AI CLI tools

Temporal Layers

Working, Session, and Long-term tiers

Supported CLI Tools

Memory Service integrates with 11 AI development tools:

1
HiveTechs CLIBuilt-in conversational AI interface
2
Claude CodeAnthropic's coding assistant
3
Gemini CLIGoogle's AI assistant
4
Qwen CodeAlibaba's coding model
5
OpenAI CodexOpenAI's code generation
6
GitHub Copilot CLIGitHub's AI pair programmer
7
Cursor CLIAI-first code editor
8
Grok CLIxAI's assistant
9
Spec KitSpecify CLI for specifications
10
DROIDFactory.AI development assistant
11
DeepSeek CLIDeepSeek's coding model

How Memories Are Created

Memories are written by the Curator after each consensus process completes. They contain the final validated responses—not raw AI outputs. This ensures only high-quality, verified information is stored.

Querying Stored Memories

Direct SQLite access for advanced users:

Most recent message
sqlite3 ~/.hive/hive-ai.db \
"SELECT * FROM messages ORDER BY timestamp DESC LIMIT 1"
Full-text search (FTS5)
sqlite3 ~/.hive/hive-ai.db \
"SELECT content FROM messages_fts WHERE messages_fts MATCH 'authentication' LIMIT 5"
Keyword search
sqlite3 ~/.hive/hive-ai.db \
"SELECT content FROM messages WHERE content LIKE '%refactor%' ORDER BY timestamp DESC LIMIT 5"
Recent conversations
sqlite3 ~/.hive/hive-ai.db \
"SELECT role, content FROM messages ORDER BY timestamp DESC LIMIT 10"

Using AI Tools to Query Memories

Any AI tool that can execute shell commands (Claude Code, Gemini CLI, HiveTechs CLI, etc.) can query the memory database. Simply instruct the tool:

Please use sqlite3 ~/.hive/hive-ai.db to find our recent consensus responses about authentication

Query the memory database for our previous curated discussions

Search ~/.hive/hive-ai.db for consensus results about the refactoring project

Memory Guide for AI Tools

A symlink at ~/.MEMORY.md provides guidance for AI tools on how to use the Memory Service effectively. This file helps AI assistants understand the memory system's capabilities and query patterns.

MCP Server Integration

The built-in MCP (Model Context Protocol) server exposes memories to integrated tools automatically. Benefits include:

Less repetition

Tools recall curated answers from previous sessions

Consistency

Same context available across all terminals and assistants

Faster iteration

Reliable context without re-explaining your codebase

Experience Persistent AI Memory

Share context across all your AI tools. Never repeat yourself again.

Download HiveTechs Consensus