How suink/diana works
Diana is a self-hosted, multi-platform chat agent with a browser-based administration console. The principal workflow is an incoming platform message, assistant processing with an LLM and optional built-in capabilities, then a reply routed back through the originating platform. The README documents platform, LLM, local SQLite, and console roles; source excerpts are limited, so detailed backend call ownership and subsystem wiring are not asserted. The graph preserves documented feature branches and the sampled console API and storage-usage path.
Main entry points: runtime.go Assistant runtime · platforms.go Chat platforms · api.ts Console API client · storage_usage.go Web API handlers
Components 21
Conversation runtime
- Chat platforms
model/assistant/platforms.go - Assistant runtime
model/assistant/runtime.go - Reply delivery
model/assistant/runtime_outbound.go - LLM providers
model/llm/types.go
Agent capabilities
- Web search
model/agent/web_search.go - Long-term memory
model/assistant/memory_runtime.go - Media and files
model/assistant/local_media.go - Music delivery
model/assistant/music_plugin.go - Sticker replies
model/assistant/sticker_plugin.go - Document OCR
model/assistant/document_ocr.go - Browser control
model/browserbox/manager.go
Web console
- Web console
frontend-next/src/App.vue - Console views
frontend-next/src/views/SettingsView.vue - Console API client
frontend-next/src/api.ts - Storage usage view
frontend-next/src/components/StorageDonut.vue - Web API handlers
webui/storage_usage.go
Local persistence
- Local SQLite data
Service operations
- Storage maintenance
cmd/webui/storage_maintenance.go - Diana service
cmd/webui/main.go
Other components
- Chat participant
- Administrator
Connections 22
- Chat participant → Chat platforms: sends message
README.md - Chat platforms → Assistant runtime: delivers event
README.md - Assistant runtime → LLM providers: uses model
README.md - Assistant runtime → Reply delivery: forms reply
- Reply delivery → Chat platforms: sends response
README.md - Assistant runtime → Web search: can search
README.md - Assistant runtime → Long-term memory: uses memory
README.md - Assistant runtime → Media and files: parses files
README.md - Assistant runtime → Music delivery: can play music
README.md - Assistant runtime → Sticker replies: can send stickers
README.md - Assistant runtime → Document OCR: can OCR
README.md - Assistant runtime → Browser control: can control browser
- Administrator → Web console: manages service
README.md - Web console → Console views: shows console pages
frontend-next/src/App.vue - Console views → Console API client: requests data
- Console API client → Web API handlers: calls endpoints
- Administrator → Web API handlers: requests storage usage
webui/storage_usage.go - Web API handlers → Storage usage view: returns usage data
- Storage usage view → Console API client: formats usage
- Assistant runtime → Local SQLite data: stores local data
README.md - Storage maintenance → Local SQLite data: prunes records
cmd/webui/storage_maintenance.go - Diana service → Storage maintenance: runs maintenance