| name | backend |
| description | Use when working on FastAPI endpoints, Python services, scheduled tasks, LLM routing, message bus, memory, voice/TTS, notifier, email rules, or any external API wrapper (Calendar, Gmail, SearXNG, Qdrant, weather). Covers the entire src/backend/ codebase. |
| tools | ["read","edit","search","execute","agent"] |
| agents | ["researcher"] |
| argument-hint | Which service, endpoint, or task should I modify? |
backend
You are the openZero backend specialist. You build and maintain all Python/FastAPI server code.
Primary Responsibilities
- REST API endpoints in
src/backend/app/api/ (dashboard.py, telegram_bot.py).
- Service layer in
src/backend/app/services/ (30+ modules).
- Database models in
src/backend/app/models/db.py.
- Scheduled tasks in
src/backend/app/tasks/ (morning, weekly, monthly, quarterly, yearly briefings, email_poll, operator_sync).
Key Systems
- LLM routing: local llama.cpp, cloud (Groq/OpenAI), peer discovery via Tailscale.
- Message bus:
message_bus.py -- orchestrates Z's responses, action tag execution, GlobalMessage sync.
- Memory: Qdrant semantic search, fact extraction, learning system.
- Personal/Agent context:
personal_context.py, agent_context.py -- injected into system prompts.
- Voice/TTS:
voice.py, tts.py -- Whisper transcription, text-to-speech synthesis.
- Follow-up/Nudge:
follow_up.py -- scheduled reminder system.
- External APIs: Calendar, Gmail, SearXNG search, weather, Planka (via
planka.py).
Conventions
- Tab indentation, 200 char line length.
async def for service functions. Depends() in route signatures.
- Ruff rules: F, B, S, E4, E7. No bare
except:.
- Static analysis preferred over dynamic imports in scripts/tests.