How carina299/rbtl works
RBTLove is a private, single-user AI companion chat with long-term memory and a photo album. The main interaction runs from the phone PWA through the relay to a locally running AI channel, with replies returning through the relay. Memory can be searched or saved on demand by the agent, or distilled asynchronously from chat; album uploads are stored and exposed for timeline browsing. The graph reflects README-documented links and sampled source references; unsampled UI and integration details are not expanded beyond those references.
Main entry points: app.py Relay API · extraction_graph.py Dialogue extraction · album.py Album upload and entries · embeddings.py Embedding providers
Components 26
User and AI interfaces
- Phone PWA
frontend/js/desktop.js - AI channel plugin
channel/server.ts - MCP tools
backend/mcp_server.py - Album timeline UI
frontend/memories.html
Chat relay
- Relay API
backend/app.py - Live chat and SSE
backend/app.py
Long-term memory
- Memory jobs
backend/tasks.py - Celery scheduler
backend/celery_app.py - Dialogue extraction
backend/memory/extraction_graph.py - LLM extraction
backend/memory/llm.py - Memory deduplication
backend/memory/dedup.py - Explicit memory write
backend/memory/remember.py - Memory retrieval
backend/memory/retrieval_graph.py - Memory reranking
backend/memory/rerank.py - Embedding providers
backend/memory/embeddings.py
Album and persistence
- Album upload and entries
backend/album.py - Object storage
backend/storage.py - Data repositories
backend/repositories.py - Database models
backend/models.py - Database sessions
backend/database.py
Other components
- Person
- Local AI
- PostgreSQL
- LLM services
- Embedding services
- MinIO or S3
Connections 30
- Person → Phone PWA: uses
README.md - Phone PWA → Relay API: sends chat
README.md - Relay API → Live chat and SSE: routes chat
backend/app.py - Local AI → AI channel plugin: runs locally
README.md - AI channel plugin → Relay API: exchanges messages
README.md - Relay API → AI channel plugin: streams messages
README.md - Relay API → Memory jobs: dispatches extraction
backend/app.py - Celery scheduler → Memory jobs: schedules jobs
backend/tasks.py - Memory jobs → Dialogue extraction: runs extraction
backend/tasks.py - Dialogue extraction → LLM extraction: extracts candidates
backend/memory/extraction_graph.py - Dialogue extraction → Embedding providers: embeds candidates
backend/memory/extraction_graph.py - Dialogue extraction → Memory deduplication: decides actions
backend/memory/extraction_graph.py - MCP tools → Explicit memory write: calls
backend/mcp_server.py - MCP tools → Memory retrieval: calls
backend/mcp_server.py - MCP tools → Album upload and entries: calls
backend/mcp_server.py - Explicit memory write → Embedding providers: embeds content
backend/memory/remember.py - Explicit memory write → Memory deduplication: checks duplicates
backend/memory/remember.py - Memory retrieval → Embedding providers: embeds query
backend/memory/retrieval_graph.py - Memory retrieval → Memory reranking: reranks candidates
backend/memory/retrieval_graph.py - Album timeline UI → Relay API: browses album
- Relay API → Album upload and entries: handles uploads
backend/app.py - Album upload and entries → Object storage: stores photos
backend/album.py - Album upload and entries → Data repositories: records entries
backend/album.py - Relay API → Data repositories: uses repositories
backend/app.py - Data repositories → Database models: queries models
backend/repositories.py - Database models → Database sessions: inherits base
backend/models.py - Database sessions → PostgreSQL: connects to
backend/database.py - LLM extraction → LLM services: calls provider
- Embedding providers → Embedding services: calls provider
- Object storage → MinIO or S3: stores objects