How des1red/vex works
Vex is a local-first conversational runtime: users submit text through its terminal or optional LAN web interface, and the runtime handles requests with deterministic intent and knowledge logic before allowing a controlled local Ollama fallback. Its documented capabilities also include interactive command execution, system and file tools, diagnostics, and first-run model setup. The graph preserves these product branches; several connections are dashed because their wiring was not visible in the sampled source.
Main entry points: responder.go Responder · knowledge.go Knowledge library · llm_fallback.go LLM fallback policy · runtime.go CLI lifecycle
Components 20
User interfaces
- Terminal driver
internal/communication/interaction/drivers/terminal_driver.go - Web server
internal/web/server.go - Interaction layer
internal/communication/interaction/interaction.go
Conversation pipeline
- Event handler
internal/communication/handler/handle_event.go - Intent classifier
internal/communication/intent/classifier.go - Responder
internal/communication/responder/responder.go - LLM fallback policy
internal/communication/responder/fallback/llm_fallback.go
Knowledge and tools
- Knowledge library
internal/library/knowledge.go - Social answers
internal/library/social/question.go - Math answers
internal/library/math/answer.go - System commands
internal/library/system/help.go - File and system tools
internal/library/tools/answer.go - Execution sessions
internal/library/tools/execution/manager_command.go
Runtime services
- Runtime state
internal/state/state.go - Conversation memory
internal/communication/memory/memory.go - Local LLM
internal/llm/llm.go
Setup and management
- Model bootstrap
internal/bootstrap/install.go - Diagnostics
internal/doctor/doctor.go - CLI lifecycle
cmd/runtime.go
Other components
- User
Connections 21
- User → Terminal driver: enters text
- User → Web server: submits text
- Web server → Interaction layer: injects text
internal/web/server.go - Terminal driver → Interaction layer: submits text
- Interaction layer → Event handler: dispatches events
- Event handler → Intent classifier: classifies input
- Intent classifier → Responder: routes intent
- Responder → Knowledge library: checks knowledge
- Knowledge library → Social answers: matches questions
- Knowledge library → Math answers: answers calculations
- Knowledge library → System commands: handles commands
- Responder → LLM fallback policy: requests fallback
- LLM fallback policy → Local LLM: invokes inference
internal/communication/responder/fallback/llm_fallback.go - LLM fallback policy → Conversation memory: reads and updates
internal/communication/responder/fallback/llm_fallback.go - Local LLM → Runtime state: reads mode
internal/llm/llm.go - Responder → File and system tools: offers tools
- File and system tools → Execution sessions: manages sessions
- Execution sessions → Runtime state: reads session state
internal/library/tools/execution/manager_command.go - User → CLI lifecycle: runs commands
- CLI lifecycle → Model bootstrap: starts setup
- CLI lifecycle → Diagnostics: requests diagnostics