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.
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.
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.
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 detailsResearch 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 detailsResult
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.
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.
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.
- Operator
- Browser dashboard
- 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
- Interface and streaming HTML, CSS and vanilla JS served by FastAPI · marked + DOMPurify · SSE for chat, research progress and completions
- Application FastAPI · Uvicorn · Pydantic · HTTPX · YAML configuration
- Local persistence SQLite with FTS5 · Markdown exports · local attachments · JSONL tool audit log
- 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.
Research authorization is conversation-scoped: the card explains exactly what goes out (only the query text) and can be revoked at any time.
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.
- Question
- Planning
- Source queriesNo web access yet Explicit authorization card
- Evidence ledger
- 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.
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:
- Turns stored in SQLite
- Summaries and FTS5 index
- Repack when the window fills
- Recent turns preserved
- 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.
- 2Concurrent /v1 generations
- 5Active keys (maximum)
- 30 sQueue 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
- 693Tests collected by pytest
- 5Built-in tools
- 2Interface 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
| Component | Reference machine |
|---|---|
| OS | Windows |
| GPU | NVIDIA GeForce RTX 3080 Ti (12 GB VRAM) |
| CPU | Intel Core i7-12700KF |
| RAM | 32 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.