How wisbargo/open-webui works
Open WebUI is a self-hosted AI platform for chat across local Ollama and OpenAI-compatible models, with collaboration, knowledge retrieval, extensibility, and administration. The main user workflow is composing a chat request in the web UI, sending it through the API, and receiving a model response; the backend also owns chat persistence. README capabilities support the additional feature branches shown. The sampled source confirms the chat API entry point, pipeline administration, retrieval abstractions, and selected collaboration behavior; unsampled subsystem links are kept conservative.
Main entry points: main.py ASGI application · Settings.svelte Admin console · retrieval.py Retrieval API · Chat.svelte Chat interface
Components 28
Chat and inference
- Chat interface
src/lib/components/chat/Chat.svelte - Chat API client
src/lib/apis/chats/index.ts - ASGI application
backend/open_webui/main.py - Model connections
backend/open_webui/routers/openai.py - Chat records
backend/open_webui/models/chats.py - Message records
backend/open_webui/models/messages.py
Knowledge and files
- Knowledge workspace
src/lib/components/chat/MessageInput/Commands/Knowledge.svelte - Retrieval API
backend/open_webui/routers/retrieval.py - Document extraction
backend/open_webui/retrieval/loaders/main.py - Vector database layer
backend/open_webui/retrieval/vector/main.py - File management
backend/open_webui/routers/files.py - File storage
backend/open_webui/storage/provider.py
Collaboration and workflows
- Shared channels
src/lib/components/channel/Channel.svelte - Channel API
backend/open_webui/routers/channels.py - Calendar
src/lib/components/calendar/CalendarView.svelte - Scheduled automations
backend/open_webui/routers/automations.py - Notes workspace
src/lib/components/chat/MessageInput/InputMenu/Notes.svelte
Extensions and media
- Plugin settings
src/lib/components/admin/Functions.svelte - Plugin management
backend/open_webui/routers/functions.py - MCP integration
backend/open_webui/utils/mcp/client.py - Voice and audio
backend/open_webui/routers/audio.py - Image generation
backend/open_webui/routers/images.py
Identity and operations
- Admin console
src/lib/components/admin/Settings.svelte - Authentication
backend/open_webui/routers/auths.py - Roles and groups
backend/open_webui/routers/groups.py - Usage and evaluation
backend/open_webui/routers/analytics.py
Other components
- User
- Webhook destinations
Connections 26
- User → Chat interface: composes prompt
- Chat interface → Chat API client: sends chat
- Chat API client → ASGI application: calls API
- ASGI application → Model connections: routes inference
- ASGI application → Chat records: persists chat
- ASGI application → Message records: persists messages
- User → Knowledge workspace: selects knowledge
- Knowledge workspace → Retrieval API: requests retrieval
- Retrieval API → Document extraction: extracts documents
- Retrieval API → Vector database layer: searches vectors
- User → File management: uploads files
- File management → File storage: stores files
- User → Shared channels: collaborates
- Shared channels → Channel API: manages channels
- User → Calendar: manages schedule
- User → Notes workspace: edits notes
- User → Plugin settings: configures extensions
- Plugin settings → Plugin management: manages plugins
- Plugin management → MCP integration: connects MCP
- User → Voice and audio: uses voice
- User → Image generation: requests images
- User → Admin console: administers platform
- Admin console → Authentication: manages access
- Admin console → Roles and groups: manages groups
- Admin console → Usage and evaluation: reviews usage
- Scheduled automations → Webhook destinations: sends notifications