How aanandmodi/aria works
ARIA is a self-hosted assistant that consolidates messages and digital-life commands in Telegram. Its primary flow accepts a Telegram update, queues it for asynchronous processing, interprets the request, and dispatches handlers that respond through Telegram or connected services. Inbound communications are classified and surfaced as notifications; persistent state and scheduled briefings support the broader product. The map combines sampled code, SOURCE INDEX references, and README-documented capabilities; several integration and handler internals were not sampled.
Main entry points: reply_handler.py Reply handler · inbound.py Inbound processor · telegram_processor.py Update processor · briefing.py Morning briefing
Components 23
Entry and channels
- Telegram bot
- Message channels
- Telegram webhook
api/routes/telegram.py
Assistant runtime
- Inbound processor
api/workers/inbound.py - Update processor
api/workers/telegram_processor.py - Command router
api/handlers/router.py - Reply handler
api/handlers/reply_handler.py - Inbox agent
api/agents/inbox_agent.py
AI and workflows
- Groq language model
api/llm/client.py - Intent parsing
api/llm/intent.py - Message classification
api/llm/classify.py - Voice transcription
api/llm/transcribe.py - Morning briefing
api/workers/briefing.py
Connected services
- Telegram delivery
api/services/telegram_service.py - Gmail service
api/services/gmail_service.py - WhatsApp service
api/services/whatsapp_service.py - GitHub service
api/services/github_service.py - Other integrations
api/services
State and infrastructure
- Redis job queue
api/core/queue.py - PostgreSQL data
api/db/models.py - Database sessions
api/db/session.py - Runtime configuration
api/core/config.py
Other components
- User
Connections 30
- User → Telegram bot: sends commands
README.md - Telegram bot → Telegram webhook: posts updates
README.md - Telegram webhook → Redis job queue: enqueues update
api/routes/telegram.py - Redis job queue → Update processor: dispatches jobs
README.md - Update processor → Command router: routes commands
api/workers/telegram_processor.py - Update processor → Reply handler: handles replies
api/workers/telegram_processor.py - Command router → Intent parsing: parses intent
api/handlers/router.py - Intent parsing → Groq language model: requests completion
api/llm/intent.py - Command router → Reply handler: dispatches replies
api/handlers/router.py - Message channels → Inbound processor: delivers messages
README.md - Inbound processor → Message classification: scores messages
api/workers/inbound.py - Inbound processor → Voice transcription: transcribes voice
api/workers/inbound.py - Inbound processor → Telegram delivery: sends alerts
api/workers/inbound.py - Inbound processor → PostgreSQL data: persists messages
api/workers/inbound.py - Inbox agent → Gmail service: reads messages
api/agents/inbox_agent.py - Inbox agent → WhatsApp service: reads messages
api/agents/inbox_agent.py - Reply handler → Gmail service: sends email
api/handlers/reply_handler.py - Reply handler → WhatsApp service: sends reply
api/handlers/reply_handler.py - Reply handler → Telegram delivery: notifies user
api/handlers/reply_handler.py - Reply handler → GitHub service: uses GitHub actions
api/handlers/reply_handler.py - Update processor → Morning briefing: invokes briefing
api/workers/telegram_processor.py - Morning briefing → Telegram delivery: delivers digest
api/workers/briefing.py - Morning briefing → Other integrations: gathers digest data
api/workers/briefing.py - Message classification → Groq language model: scores with model
README.md - Voice transcription → Groq language model: uses Whisper
README.md - Other integrations → PostgreSQL data: stores application data
README.md - Telegram webhook → Runtime configuration: checks access
api/routes/telegram.py - Database sessions → PostgreSQL data: opens sessions
api/db/session.py - Update processor → Database sessions: uses database sessions
api/workers/telegram_processor.py - Morning briefing → Database sessions: opens database session
api/workers/briefing.py