How ollaya-dev/ollaya works
Ollaya runs local decision models: a client submits state and typed questions, the daemon resolves or routes a model, schedules its runner, and returns calibrated answers. Model download and management form a separate lifecycle; inference supports ONNX and GGUF/llama.cpp, with vision and language routing also documented. The graph follows the README and sampled sources; unsampled module wiring is included only where the README or source excerpt supports it.
Main entry points: service.rs Decision service · server.rs Runner endpoint · client.rs Daemon client · http.rs HTTP API
Components 24
User interfaces
- CLI commands
crates/ollaya/src/main.rs - MCP service
crates/ollaya/src/mcp.rs - Desktop app
desktop/ui/src/main.ts - Model catalog
site/src/pages/search.tsx - Daemon client
crates/ollaya-api/src/client.rs
Daemon orchestration
- HTTP API
crates/ollaya-server/src/http.rs - Decision service
crates/ollaya-server/src/service.rs - Runner scheduler
crates/ollaya-server/src/scheduler.rs
Model lifecycle
- Model registry
crates/ollaya-registry/src/lib.rs - Local model store
crates/ollaya-registry/src/store.rs - Model puller
crates/ollaya-registry/src/pull.rs
Inference runtime
- Runner endpoint
crates/ollaya-runner/src/server.rs - Engine dispatch
crates/ollaya-runner/src/engine.rs - GGUF runner
crates/ollaya-runner/src/llama/mod.rs - ONNX runtime
crates/ollaya-runner/src/onnx.rs - Vision inputs
crates/ollaya-runner/src/vision.rs
Decision semantics
- Question parsing
crates/ollaya-decision/src/lib.rs - Answer calibration
crates/ollaya-decision/src/calibration.rs - Language routing
crates/ollaya-lang/src/route.rs
Other components
- CLI user
- API client
- MCP agent
- Desktop user
- Hugging Face
Connections 27
- CLI user → CLI commands: issues commands
- CLI commands → Daemon client: calls daemon
- Daemon client → HTTP API: sends HTTP
- API client → HTTP API: calls API
- MCP agent → MCP service: sends MCP requests
- MCP service → Daemon client: uses client
- Desktop user → Desktop app: runs models
- Desktop app → Daemon client: uses backend
- Model catalog → Hugging Face: links model files
- HTTP API → Decision service: dispatches requests
- Decision service → Language routing: routes state
- Decision service → Question parsing: parses questions
- Decision service → Runner scheduler: acquires runner
- Runner scheduler → Runner endpoint: spawns runner
- Runner endpoint → Engine dispatch: serves inference
- Engine dispatch → ONNX runtime: loads ONNX
- Engine dispatch → GGUF runner: loads GGUF
- Runner endpoint → Vision inputs: decodes images
- Runner endpoint → Decision service: returns logits
- Decision service → Answer calibration: calibrates logits
- Decision service → HTTP API: returns answers
- Decision service → Local model store: resolves models
- Decision service → Model puller: starts pulls
- Model puller → Local model store: writes model files
- Model puller → Hugging Face: downloads weights
- Model registry → Local model store: manages manifests
- CLI commands → Decision service: creates model specs