A self-hosted, developer-focused AI chat workspace for local Ollama models. Single-binary deployment, zero runtime dependencies.
... models.{{variable}} templating. Insert into chat with one click.go run ./cmd/silo
Open http://localhost:8080. The frontend auto-builds on first run.
make build
./silo
make dev
Frontend on http://localhost:5173 (auto-reloads on changes), API on :8080.
| Flag | Env Variable | Default | Description |
|---|---|---|---|
--port |
SILO_PORT |
8080 |
HTTP port |
--ollama-url |
OLLAMA_URL |
http://localhost:11434 |
Ollama API URL |
--db |
SILO_DB |
silo.db |
SQLite database path |
--dev |
— | false |
Use Vite dev server on :5173 |
cmd/silo/main.go — Entry point, flag parsing, DB init, auto-builds frontend
embed.go — Embeds ui/dist into the Go binary for production builds
internal/
server/ — Chi router, middleware, static file serving
handler/ — All API handlers (workspaces, conversations, messages,
prompts, sandbox, git, export, RAG, MCP, compare, settings)
db/ — SQLite database layer (auto-migrate, queries)
ollama/ — Ollama REST client (list models, chat with SSE, embed)
sandbox/ — Subprocess code execution with timeout/output limits
git/ — Git CLI wrapper (info, diff, log, file tree)
rag/ — Document chunking, Ollama embeddings, cosine similarity
mcp/ — MCP JSON-RPC client
ui/
src/
lib/
api/ — Frontend API client (fetch wrappers, SSE streaming)
stores/ — Svelte 5 runes-based state stores
components/ — Svelte components (Chat, Sidebar, Message, PromptLibrary,
Sandbox, Git, RAG, MCP, Compare, Settings)
routes/ — SvelteKit page layout
app.css — Global styles, CSS variables for dark/light themes
Makefile — Build, dev, run, clean targets
All API routes are under /api:
| Method | Path | Description |
|---|---|---|
| GET | /api/health |
Health check |
| GET | /api/models |
List Ollama models |
| POST | /api/chat/stream |
Streaming chat (SSE) |
| GET/POST/PUT/DELETE | /api/workspaces |
Workspace CRUD |
| GET/POST/PUT/DELETE | /api/workspaces/:id/conversations |
Conversation CRUD |
| GET/POST/PUT/DELETE | /api/conversations/:id/messages |
Message CRUD |
| GET | /api/conversations/:id/tree |
Message tree (branching) |
| GET/POST/PUT/DELETE | /api/prompts |
Prompt library CRUD |
| POST | /api/sandbox/execute |
Execute code |
| POST | /api/git/* |
Git operations |
| GET | /api/conversations/:id/export |
Export conversation |
| POST | /api/documents/* |
RAG document management |
| GET/POST/DELETE | /api/mcp/servers |
MCP server management |
| POST | /api/chat/compare |
Model comparison |
| GET/PUT | /api/settings |
User settings |