Add README documentation
Documents service purpose, endpoints, database schema, and configuration. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
291d664051
commit
5a5bc123ce
1 changed files with 59 additions and 0 deletions
59
README.md
Normal file
59
README.md
Normal file
|
|
@ -0,0 +1,59 @@
|
||||||
|
# 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
|
||||||
|
|
||||||
|
```bash
|
||||||
|
# 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)
|
||||||
Loading…
Add table
Add a link
Reference in a new issue