# Agent Guide for src/ ## Context Contains the main Python package `reachy_mini_conversation_app`. This is the core application code for Mini Minder. ## Structure & Navigation ``` src/reachy_mini_conversation_app/ ├── console.py # FastAPI server (API endpoints + audio pipeline) ├── main.py # ReachyMiniApp entry point (robot mode) ├── stream_api.py # WebSocket streaming + REST endpoints → frontend bridge ├── openai_realtime.py # OpenAI Realtime API handler ├── realtime_handler.py # Base handler class ├── handler_factory.py # Creates OpenAI handler ├── database.py # SQLite CRUD operations ├── config.py # Application configuration ├── schemas.py # Pydantic models / data schemas ├── utils.py # Shared utilities ├── entry_state.py # Health entry state machine ├── prompts.py # Prompt builder/combiner ├── session_enrichment.py # Neo4j graph enrichment at session start ├── session_summary.py # Session summary generation ├── appointment_export.py # Clinical report export ├── email_service.py # Email delivery service ├── memory_graph.py # Neo4j knowledge graph operations ├── memory_notes.py # Session memory notes ├── graph_query_engine.py # Neo4j query engine ├── pattern_detector.py # Health pattern detection ├── missed_dose_detection.py # Missed dose tracking ├── pii_guard.py # PII redaction ├── checkin_scheduler.py # Proactive check-in scheduling ├── computer_audio.py # Host audio routing (music playback) ├── wakeword_detector.py # Wakeword detection ├── camera_worker.py # Camera frame capture ├── moves.py # Robot movement definitions ├── dance_emotion_moves.py # Dance & emotion sequences ├── headless_personality.py # Headless mode personality ├── headless_personality_ui.py # Headless personality UI ├── robot_control_api.py # Robot control REST API router ├── tools/ # LLM tools (see tools/AGENT.md) ├── prompts/ # System prompts (see prompts/AGENT.md) ├── profiles/ # Conversation profiles (see profiles/AGENT.md) │ └── _reachy_mini_minder_locked_profile/ # Clinical tools + GenUI emitters ├── langgraph_agent/ # LangGraph agent integration ├── audio/ # Audio utilities ├── vision/ # Vision processing ├── models/ # Data models ├── static/ # Static assets ├── templates/ # HTML templates └── images/ # Image assets ``` ### Key Entry Points - **API server**: `console.py` → FastAPI on port 7860 (REST + WebSocket) - **Robot app**: `main.py` → `MiniMinderApp(ReachyMiniApp)` - **Console**: `console.py` → standalone testing (no robot required) - **Handler factory**: `handler_factory.py` → creates OpenAI handler ## Development Workflow ```bash # Run tests for this package pytest tests/ -v # Run console mode python src/reachy_mini_conversation_app/console.py ``` ## Dependencies & Connections - **Internal**: `tools/`, `prompts/`, `profiles/`, `stream_api.py` - **External packages**: `openai`, `reachy-mini`, `fastapi`, `neo4j` - **Consumers**: - `frontend/` (Next.js) — consumes REST endpoints + WebSocket from `stream_api.py` - Reachy Mini daemon — consumes robot app via `main.py` - CLI — `reachy-mini-minder` entry point - **Bridge to frontend**: `stream_api.py` defines all `emit_*()` functions and REST endpoints. See `frontend/AGENT.md` for the full endpoint↔hook mapping. ## Configuration Database stored at project root: `mini_minder.db`.