recall/README.md
egregore 5a5bc123ce Add README documentation
Documents service purpose, endpoints, database schema, and configuration.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 19:57:35 +00:00

1.4 KiB

Recall Service

Memory and data persistence for Egregore.

Purpose

Stores and retrieves conversation messages using PostgreSQL. Provides the persistent memory that allows conversations to continue across sessions.

Endpoints

Endpoint Method Description
/messages POST Save a single message
/messages GET Get messages with pagination
/messages/blocks POST Save multiple response blocks
/messages/history GET Get history in Claude API format
/messages/search GET Full-text search messages
/health GET Health check

Configuration

Environment variables (from ~/.env):

Variable Description Default
DATABASE_URL PostgreSQL connection string postgresql://egregore:...@localhost/egregore

Running

# Activate venv
source ~/.venv/bin/activate

# Run directly
python main.py

# Or via systemd
sudo systemctl start recall
sudo systemctl status recall

Database Schema

Messages table with:

  • id - Auto-increment primary key
  • role - user/assistant
  • type - text/tool_use/tool_result
  • content - Message content
  • group_id - Groups related messages
  • metadata - JSON for tool info
  • priority - For notification decisions
  • timestamp - When saved

Includes full-text search index on content.

Dependencies

  • FastAPI
  • asyncpg (PostgreSQL async driver)