d7c258eba0a78f4945ce6b65e6806b384ac35dd3
Older sessions fade to a general idea; details stay retrievable.
- memory: summaries table (one compacted gist per session, embedded), plus
store_summary/get_summary/recall_summaries and unsummarized_count (tracks
exchanges newer than the current summary)
- lyra/summary.py: summarize_session compacts a session's raw turns into a
third-person gist (default SUMMARY_BACKEND=local, so compaction is free);
maybe_summarize re-summarizes once SUMMARIZE_AFTER new turns accumulate
- chat.build_messages now layers context in tiers: persona -> gists of other
sessions -> a few sharp raw cross-session details -> current session raw
turns -> new message; respond() compacts the session after each turn
- web: POST /sessions/{id}/summarize to compact on demand
- summarization activity surfaces in the live log
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Lyra
A persistent, autonomous AI assistant. From-scratch rewrite of an earlier attempt.
The design thinking that survives the rewrite lives in docs/ — start with docs/ARCH_v0-6-1.md. The previous implementation is preserved on the archive branch.
Status
Pre-MVP. Building toward the smallest useful version: chat with persistent memory across sessions.
Setup
uv sync
cp .env.example .env
# fill in ANTHROPIC_API_KEY and point LOCAL_BASE_URL at your Ollama
Architecture
The long-term target is the cognitive split in docs/ARCH_v0-6-1.md — Inner Self as the seat of consciousness, Executive for hard reasoning, Cortex Chat for drafting, Persona for voice. The MVP implements only the chat + memory baseline. Cognitive layers come back one at a time.
Description
Languages
HTML
46.7%
Python
32.1%
CSS
21.2%