{"id":"eb75a1b4-612c-455d-98ba-eca2f9d31ea9","slug":"sofia","kind":"mcp","name":"sofia","summary":"Autonomous local AI assistant in Go — 40+ tools, 20+ LLM providers, multi-agent orchestration, self-improving","owner":"grasberg","repoUrl":"https://github.com/grasberg/sofia","license":"MIT","licenseTier":"permissive","trust":"community","stars":3,"match":null,"fewStars":true,"format":"mcp","createdAt":"2026-02-27T14:31:40.000Z","addedAt":"2026-10-21T08:26:04.895Z","logoUrl":"https://avatars.githubusercontent.com/u/8834843?u=6be3061e1d97aeeca5431faf56460f86e98d36f7&v=4","linkOnly":false,"collection":null,"skillPath":null,"categories":["utilities"],"tags":["automation","golang","llm","multi-agent","self-hosted","ai","ai-agent","artificial-intelligence"],"runtime":"go","local":true,"cloudCapable":false,"cloudCapability":"unknown","cloudReadyOnPlatform":false,"needsApiKey":false,"reviewed":false,"syncedAt":"2026-10-21T14:23:03.295Z","sample":false,"url":"https://conduits.dev/tools/sofia","language":"Go","transports":["stdio"],"install":{},"requirements":{"env":[],"upstreamMayCharge":false},"tools":null,"readme":"<div align=\"center\">\n\n# 🤖 Sofia\n\n### Your Local-First, Autonomous AI Colleague\n\n[![GitHub stars](https://img.shields.io/github/stars/grasberg/sofia?style=social)](https://github.com/grasberg/sofia/stargazers)\n[![GitHub forks](https://img.shields.io/github/forks/grasberg/sofia?style=social)](https://github.com/grasberg/sofia/network/members)\n[![License](https://img.shields.io/github/license/grasberg/sofia)](https://github.com/grasberg/sofia/blob/main/LICENSE)\n[![Go Version](https://img.shields.io/github/go-mod/go-version/grasberg/sofia)](https://go.dev/)\n[![Last Commit](https://img.shields.io/github/last-commit/grasberg/sofia)](https://github.com/grasberg/sofia/commits/main)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg)](CONTRIBUTING.md)\n\n**A self-improving AI orchestrator that runs on your own machine.**\nSingle Go binary. 60+ tools. 188 models across 19 LLM providers. Multi-agent coordination.\nPersistent memory with a knowledge graph. Browser automation. Computer control.\n**And it gets better at its job over time.**\n\n[🚀 Quick Start](#-quick-start) · [✨ Features](#-key-features) · [🏗️ Architecture](#-architecture) · [🤝 Contributing](CONTRIBUTING.md)\n\n</div>\n\n---\n\n## Why Sofia?\n\nMost AI assistants are cloud-locked chatbots that wait for you to type something. **Sofia is different.**\n\n- 🏠 **Local-first** — Your config, memory, and history live on your machine in SQLite under `~/.sofia`. (LLM inference still calls a provider's API unless you run a local model with Ollama.)\n- ⚡ **Single binary** — Written in Go. No Python, no Node.js, no Docker required. Just `make build`.\n- 🧠 **Self-improving** — An opt-in evolution engine analyzes past performance and tunes the agent roster.\n- 🤖 **Multi-agent** — Spawn, coordinate, and retire agents dynamically. Agent-to-agent messaging built in.\n- 🔐 **Safety built in** — Approval gates on side-effectful tools (on by default, fail-closed). Opt-in prompt-injection and PII guardrails. Model API keys encrypted at rest (AES-256-GCM) when you set `SOFIA_DB_KEY`.\n- 🌐 **19 LLM providers** — OpenAI, Anthropic, Gemini, DeepSeek, Grok, Mistral, Groq, OpenRouter, Ollama, and more, with automatic fallback.\n\n---\n\n## 🚀 Quick Start\n\nInstall the binary, run the setup wizard, and open the dashboard:\n\n```bash\n# 1. Install (downloads the latest release, verifies its checksum, installs to ~/.local/bin)\ncurl -fsSL https://raw.githubusercontent.com/grasberg/sofia/main/install.sh | sh\n\n# 2. First-run wizard: writes config, seeds the workspace, and configures a model\nsofia onboard\n\n# 3. Start the gateway (channels + web UI)\nsofia gateway\n# → Web UI at http://127.0.0.1:18795\n```\n\n`sofia onboard` detects provider API keys from your environment (`ANTHROPIC_API_KEY`,\n`OPENAI_API_KEY`, `GEMINI_API_KEY`, and others), lets you pick a provider, validates the key\nwith a live one-token request, and saves it. If you skip it, add a model any time from the\nWeb UI **Models** page.\n\n> **Note:** the `install.sh` one-liner downloads a published GitHub release. Until the first\n> release is tagged, build from source (below) — that path works today.\n\n<details>\n<summary><b>Build from source</b></summary>\n\n```bash\ngit clone https://github.com/grasberg/sofia.git\ncd sofia\nmake deps && make build     # produces ./build/sofia\n./build/sofia onboard\n./build/sofia gateway\n```\n\n**Prerequisites:** Go 1.25+ ([download](https://go.dev/dl/)).\nAlways build with `make build` — a bare `go build` skips `go generate` and embeds a stale workspace.\n\n</details>\n\nSee the [Installation Guide](docs/installation.md) for platform notes, upgrading, and running as a service.\n\n---\n\n## ✨ Key Features\n\n### 🛠️ Autonomous Tool Use\nRead and edit files, run shell commands, search and browse the web, query databases,\nmanage Google services (Gmail/Calendar/Drive via `gog`) and GitHub (via `gh`) — with\napproval gates on anything that has side effects.\n\n### 🧠 Advanced Memory\nA tiered memory system — short-term session history, a long-term semantic knowledge graph,\nepisodic notes and reflections, and named checkpoints — persisted in local SQLite with\nautomatic summarization and consolidation.\n\n### 🤖 Multi-Agent Orchestration\nDelegate tasks to parallel agents chosen by semantic matching and reputation scores.\nAgent-to-agent mailbox messaging with broadcast, and conflict resolution when parallel\nagents disagree.\n\n### 🌐 19 LLM Providers, 188 Models\nOpenAI, Anthropic, Gemini, DeepSeek, Grok/xAI, Mistral, Groq, OpenRouter, Moonshot, Qwen,\nMiniMax, GitHub Copilot, local Ollama, and more — behind one interface with fallback chains\nand per-provider cooldown tracking.\n\n### 📚 Skill System with Self-Learning\n120+ built-in skills with expert personas, loaded from markdown `SKILL.md` files. Agents can\ndiscover, install, author, and refine skills at runtime — including pulling from the ClawHub\ncommunity registry (experimental; the client and a reference server exist, but the public\nmarketplace is not yet a stable service).\n\n### 🔄 Evolution & Self-Improvement *(opt-in)*\nA 5-phase `EvolutionEngine` (observe → diagnose → plan → act → verify) that reviews past\nperformance and creates, retires, or tunes agents. Disabled by default; enable it in config\nor trigger a single cycle with `/evolve`.\n\n### 🖥️ Computer Use\nAutonomous desktop control via screenshots and a vision model — mouse and keyboard on macOS\nand Linux.\n\n### 🌍 Browser Automation\nPlaywright-based web browsing: navigate, click, fill forms, screenshot, extract text. The\n~250 MB browser runtime downloads automatically the first time a browser tool is used, not\nat startup.\n\n### 🛡️ Guardrails & Security\nApproval gates that fail closed (on by default), input validation, budget limits, and a\ncircuit breaker for repeatedly failing tools. Prompt-injection defense and PII\ndetection/redaction are available as opt-in guardrails (off by default; enable in config).\n\n<details>\n<summary><b>📋 More Features</b></summary>\n\n- **MCP** — Act as a Model Context Protocol server (`sofia mcp-server`), and connect to external MCP servers as tools.\n- **Gateway Mode** — Telegram, Discord, Email, Web, and CLI channels through one service.\n- **Autonomy & Proactivity** *(on by default)* — Long-term goals, context triggers, a heartbeat, and background research delivered to your last active channel.\n- **Cron Scheduling** — One-time (`at`), interval (`every`), and cron-expression jobs from chat, CLI, or the dashboard.\n- **Workflows** — Deterministic multi-step flows with approval gating (e.g. email support-reply, GitHub issue fixing).\n- **Voice** — Speech-to-text for Discord/Telegram voice notes; text-to-speech via ElevenLabs or the OS engine.\n- **Remote Access** — Expose the dashboard over your tailnet (or publicly) via Tailscale.\n- **Modern Web UI** — Real-time updates, streaming chat, file uploads, and settings for every subsystem.\n\n</details>\n\n---\n\n## 🏗️ Architecture\n\n```\n┌─────────────────────────────────────────────────────────┐\n│                    Channels (Input)                      │\n│   Telegram  ·  Discord  ·  Email  ·  Web UI  ·  CLI      │\n└──────────────────────────┬──────────────────────────────┘\n                           │\n                    ┌──────▼──────┐\n                    │   Gateway    │  ← HTTP/WebSocket + health endpoints\n                    └──────┬──────┘\n                           │\n              ┌────────────┼────────────────┐\n              │         Orchestrator          │\n              │  ┌─────────┴──────────┐      │\n              │  │  Evolution Engine   │      │  (opt-in)\n              │  │  (Self-Improvement) │      │\n              │  └────────────────────┘      │\n              │                               │\n              │  ┌──────────┐  ┌──────────┐  │\n              │  │  Agent 1  │  │  Agent 2  │  │  (A2A messaging)\n              │  └─────┬────┘  └─────┬────┘  │\n              └────────┼─────────────┼────────┘\n                       │             │\n              ┌────────┴─────────────┴────────┐\n              │         Tool Layer             │\n              │  File · Shell · Web · Browser  │\n              │  GitHub · Google · Bitcoin     │\n              │  Cron · Memory · Plan · MCP    │\n              └───────────────┬────────────────┘\n                              │\n                    ┌─────────▼─────────┐\n                    │   LLM Providers    │\n                    │  19 with fallback  │\n                    └───────────────────┘\n```\n\nFor a full, source-grounded walkthrough of every subsystem, see [docs/features.md](docs/features.md).\n\n---\n\n## ⚔️ Comparison\n\n| | **Sofia** | **AutoGPT** | **CrewAI** | **LangChain** | **OpenDevin** |\n|---|:---:|:---:|:---:|:---:|:---:|\n| **Local-first state** | ✅ | ❌ | ❌ | ❌ | ❌ |\n| **Single binary** | ✅ | ❌ | ❌ | ❌ | ❌ |\n| **60+ built-in tools** | ✅ | Limited | Via plugins | Via plugins | Limited |\n| **Knowledge graph** | ✅ | Basic | ❌ | ❌ | ❌ |\n| **Self-improving** | ✅ | ❌ | ❌ | ❌ | ❌ |\n| **Multi-agent orchestration** | ✅ | Basic | ✅ | Basic | ❌ |\n| **Browser automation** | ✅ | ❌ | ❌ | ❌ | ❌ |\n| **Computer use** | ✅ | ❌ | ❌ | ❌ | ❌ |\n| **Security guardrails** | ✅ | ❌ | ❌ | ❌ | ❌ |\n| **Language** | Go | Python | Python | Python | Python |\n\n\"Local-first state\" means your config, memory, and history stay on your machine.\nLLM inference is served by whichever provider you configure (cloud, unless you run Ollama locally).\n\n---\n\n## 📂 Where Sofia stores things\n\n```\n~/.sofia/\n├── config.json          # channels, gateway, web UI, agents, tools, guardrails\n├── memory.db            # model catalog + API keys, memory, goals, sessions (SQLite)\n├── audit.db             # structured audit trail of every action\n├── workspace/\n│   ├── AGENT.md         # base agent instructions\n│   ├── IDENTITY.md      # who Sofia is\n│   ├── SOUL.md          # personality & behavior rules\n│   ├── USER.md          # your preferences\n│   ├── skills/          # 120+ skill definitions (name/SKILL.md)\n│   └── agents/          # 40 agent templates (flat .md files)\n└── logs/                # written when running as a background service\n```\n\nNothing here lives in the repo — runtime state is entirely under `~/.sofia`.\n\n---\n\n## 🗺️ Roadmap\n\n- [ ] **Published release binaries** — first tagged GitHub release + Homebrew tap\n- [ ] **Plugin SDK** — third-party tool development kit\n- [ ] **Team Mode** — multi-user collaboration\n- [ ] **Cloud Sync** — optional encrypted backup\n\n---\n\n## 🤝 Contributing\n\nWe love contributions! See [CONTRIBUTING.md](CONTRIBUTING.md) for setup, conventions, and the PR process.\n\nWhether you are fixing a bug, adding a feature, improving docs, or sharing a skill — every contribution matters.\n\n## 🛡️ Security\n\n- **Secrets at rest** — Set `SOFIA_DB_KEY` (16+ chars) and Sofia encrypts model API keys in\n  the local SQLite database with AES-256-GCM (key derived via PBKDF2-SHA256, per-install salt).\n  Without the key, secrets are stored in plaintext in your local DB — set it to encrypt them.\n- **Web UI binds loopback** — The dashboard listens on `127.0.0.1` by default. It has no auth\n  unless you set `webui.auth_token`, and it can execute commands via chat — so the gateway\n  **refuses to start** on a non-loopback interface unless a token is configured.\n- **Approval gates fail closed** — Side-effectful tools require approval unless you opt out per\n  session with `/yolo`; a missing approval gate denies rather than allows.\n\nFound a vulnerability? Please see [SECURITY.md](SECURITY.md) for responsible disclosure.\n\n## 📄 License\n\nSofia is released under the [MIT License](LICENSE).\n\n---\n\n<div align=\"center\">\n\n**[⭐ Star us on GitHub](https://github.com/grasberg/sofia)** · **[🐛 Report a Bug](https://github.com/grasberg/sofia/issues)** · **[💬 Join the Discussion](https://github.com/grasberg/sofia/discussions)**\n\nMade with ❤️ by the Sofia community\n\n</div>\n"}