silo Svelte Themes

Silo

Silo – The developer AI Chat for Ollama models

Silo

A self-hosted, developer-focused AI chat workspace for local Ollama models. Single-binary deployment, zero runtime dependencies.

Features

  • Chat — Multi-turn conversations with any Ollama model, streaming responses, conversation branching, markdown with syntax highlighting, thinking/reasoning display for ... models.
  • Workspaces — Isolated environments with separate conversations, system prompts, and default models.
  • Prompt Library — Save, tag, and categorize prompts with {{variable}} templating. Insert into chat with one click.
  • Code Sandbox — Execute code inline (Python, JavaScript, Go, TypeScript, Bash) with configurable timeouts.
  • Git Integration — View repo status, diffs, file trees, commit logs. Generate AI commit messages from staged changes.
  • RAG (Knowledge) — Upload documents (.txt, .md, .pdf), embed them with Ollama, search via cosine similarity.
  • MCP Client — Connect to MCP servers, browse tools, and call them directly from the UI.
  • Model Comparison — Send the same prompt to multiple models and view responses side-by-side.
  • Export — Export conversations as Markdown, JSON, or Plain Text.
  • Settings — Configurable Ollama URL, default model, theme (dark/light/system), sandbox timeout.

Quick Start

Prerequisites

  • Go 1.22+
  • Node.js 20+
  • Ollama running locally with at least one model (e.g., ollama pull llama3.2)

Run

go run ./cmd/silo

Open http://localhost:8080. The frontend auto-builds on first run.

Build binary

make build
./silo

Development mode (hot-reload)

make dev

Frontend on http://localhost:5173 (auto-reloads on changes), API on :8080.

Configuration

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

Architecture

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

API Overview

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

Tech Stack

  • Backend: Go, chi router, SQLite (via mattn/go-sqlite3)
  • Frontend: Svelte 5, TypeScript, Tailwind CSS v4
  • Icons: Lucide Svelte
  • Markdown: marked + highlight.js
  • AI: Ollama REST API

Top categories

Loading Svelte Themes