Enslaved

Local AI with real control: model, data and permissions on your machine.

Personal AI assistant that runs models locally through Ollama: streaming chat, history and context in your own database, explicitly permissioned tools, evidence-backed web research and an OpenAI-compatible /v1 API for editors and CLIs.

View repository on GitHub ↗
Year
Role
Creator · Technical Product + full stack development
Stage
Own-use tool
Product
AI assistant · Local stack
Base
Open source (MIT) on GitHub ↗
Focus
Local inference · Tool permissions · APIs · Context

Summary

Problem
Use capable AI for personal work without giving up control of the model, the data and the costs.
My role
Creator responsible for product, architecture and the full stack implementation.
Result
Working local stack: chat dashboard, permissioned tools, evidence-backed research and a /v1 API for OpenCode.
Key decision
Treat permissions and context as product decisions, not implementation details.

Status and evidence

Stage
Own-use tool, in active development.
What exists or has been validated
Open source on GitHub with 693 tests collected by pytest; dashboard and /v1 API validated with OpenCode.
Next validation
Code-focused fine-tuning and MCP integration remain roadmap work.

Technical Scope

  • 693 Collected tests
  • 5 Built-in tools
  • 3 Research depth levels
  • 2 Interface languages

The problem

Cloud assistants force personal and development work to give up three things: control of the model, privacy of the data and cost predictability. Enslaved exists to run capable AI on your own machine, through Ollama, without giving up a complete product experience.

Four product decisions

Explicit permissions before convenience

File reads and web access start in ask: every outbound call shows its destination and asks for approval in a card. The policy is allow, ask or deny per capability.

See details

The API is a product boundary

The /v1 API is stateless and OpenAI-compatible. It does not expose dashboard chats, skills or memory — clients bring their own messages and tool results.

See details

Context is managed, not truncated

Conversations live in SQLite with FTS5. Repack compacts long threads while preserving recent turns, and relevant history can be recovered within the same conversation.

See details

Research with budgets and evidence

Quick, Deep and Extended define how much web an investigation may use: request, time and byte limits, with an evidence ledger and source links.

See details

Result

A working, open-source local stack: streaming chat dashboard, explicitly permissioned tools, evidence-backed web research and a /v1 API that connects editors and CLIs to the local model.

Streaming reply with a markdown table and code — Tools, Reasoning and Animation toggles live in the composer

The problem

Personal and development work with AI hits three product limits, not model limits:

  • Model control. Version, context, temperature and cost per token belong to the provider, not the operator.
  • Data privacy. Conversations, files and code leave the machine by default.
  • Integration. Each editor or CLI demands its own assistant, disconnected from local history and tools.

Enslaved attacks all three at once: local inference through Ollama, local persistence in SQLite, and an OpenAI-compatible API any client already knows how to consume.

Product in Use

The dashboard opens with the local model ready: sidebar with conversations, skills and tools; composer with Tools, Reasoning and Animation toggles; per-conversation context usage in the footer.

The reply streams in over SSE, renders markdown with tables and code blocks, and can be stopped at any moment. Images can be attached when the selected model supports vision.

Chat in production — markdown table, code and a reasoning chip with thinking time

My Role

I design and maintain Enslaved alone: product decisions (what becomes a tool, what asks for permission, what goes out through the API), architecture (FastAPI, SQLite, SSE, Ollama) and the full implementation, from backend to dashboard CSS.

  • AI Product
  • Local AI
  • Ollama
  • FastAPI
  • SQLite + FTS5
  • SSE
  • Permissions
  • APIs
  • Context
  • Testing
  • Trade-offs

Architecture and Stack

Conceptual representation. No internal endpoints, database schema or credentials.

  1. Operator
  2. Browser dashboard
  3. FastAPI application layer Chat · Research · Tools · Local API

Local data and inference

  • SQLite + FTS5
  • Markdown exports and attachments
  • Ollama runtime
  • Active model (e.g. Qwen3.5 RANA 9B)

Stack by responsibility

  1. Interface and streaming HTML, CSS and vanilla JS served by FastAPI · marked + DOMPurify · SSE for chat, research progress and completions
  2. Application FastAPI · Uvicorn · Pydantic · HTTPX · YAML configuration
  3. Local persistence SQLite with FTS5 · Markdown exports · local attachments · JSONL tool audit log
  4. Inference Ollama's native API · per-model profiles · simulated provider for development and tests

FastAPI also serves the frontend: no Node build, the checkout runs with python -m backend.main and a browser.

Permissions: leaving the machine is a request, not a default

Enslaved’s default is loopback. What leaves the machine — file reads and web access — goes through an explicit per-capability policy: allow, ask or deny.

File reads and web fetches start in ask. Each card shows the action, the parameters and the destination before approval, with an option to remember the decision for the conversation.

Permission card — net.fetch in ask mode shows the URL and destination before approving

Research authorization is conversation-scoped: the card explains exactly what goes out (only the query text) and can be revoked at any time.

Research authorization — the scope covers the conversation and is revocable

Web research with budgets and evidence

Research has three depth levels — Quick, Deep and Extended — and each level is an operational budget: max pages, requests, seconds and bytes. The report ships with source links and an evidence ledger of what was actually consulted.

  1. Question
  2. Planning
  3. Source queries
    No web access yet Explicit authorization card
  4. Evidence ledger
  5. Report with sources

DuckDuckGo is the default search provider; Brave is optional and requires a local key. The capture below is a real investigation about FastAPI, with [web#n] citations linked to the sources.

Research report — summary with [web#n] citations and linked sources at the end

Context is managed, not truncated

Each conversation keeps its own context, and usage is visible in the dashboard footer. Enslaved assumes long threads are normal:

  1. Turns stored in SQLite
  2. Summaries and FTS5 index
  3. Repack when the window fills
  4. Recent turns preserved
  5. Relevant history recoverable

Repack compacts the conversation while preserving recent turns, without using the model to summarize by default — deterministic compaction, no context hallucination. Relevant history can be recovered within the same conversation. Transcripts export as Markdown.

The local API: one model for the dashboard and the editor

Under Settings → Local API, the operator enables an OpenAI-compatible endpoint at 127.0.0.1:8000/v1: GET /v1/models and POST /v1/chat/completions (JSON or SSE, with client-supplied tool schemas when the model supports them).

The boundary is deliberate: the API is stateless and gives no access to dashboard chats, skills or memory. The client sends its own messages and tool results. Keys are shown in full once at creation and stored as hashes with a display prefix.

Settings — active model, language and the Local API toggle with the endpoint scope
  • 2
    Concurrent /v1 generations
  • 5
    Active keys (maximum)
  • 30 s
    Queue timeout before 429

With OpenCode, the validated flow covered tool calling, file creation and editing, command execution, unit tests and streaming: OpenCode sends messages and schemas, Enslaved forwards the turn to Ollama and returns tool calls for the client to execute under its own permissions.

Engineering and Validation

Tests as part of the product

  • 693
    Tests collected by pytest
  • 5
    Built-in tools
  • 2
    Interface languages

The suite covers chat, streaming, tools, research, the /v1 API, hardening and i18n. Most tests run with simulated inference and mocked HTTP; browser tests use Playwright with a real Chrome and write local artifacts. That separation keeps the loop fast without giving up interface coverage.

Reference hardware

ComponentReference machine
OSWindows
GPUNVIDIA GeForce RTX 3080 Ti (12 GB VRAM)
CPUIntel Core i7-12700KF
RAM32 GB

Models run locally through Ollama. The active model is an operator choice — currently Qwen3.5 RANA 9B — and per-model profiles define context, temperature and output limits.

Honest limitations

The documented deployment is a local Windows checkout for a trusted operator; the dashboard has no login or HTTPS, and the project has no external security audit. Research and reports can contain errors, and context limits still exist — they are just under the operator’s control.