A self-hosted, local-first AI workspace — multi-model chat with tools, long-term memory, automations, integrations and a desktop app, all running on your infrastructure.
AI Workspace is an OpenWebUI-style AI platform built to own its own data: you chat with any model, give it tools and memory, create automations and integrate with your services — and none of it leaves your machine except the call to the model provider and whatever you tell the tools to do. Secrets are stored encrypted at rest in the database.
It's not a chat wrapper. It's a full stack: a turn orchestrator with tool-calling, vector memory, a knowledge base (RAG), scheduled automations, messaging channels (WhatsApp/Telegram/Discord), an OpenAI-compatible public API, end-to-end observability and a desktop app with a tray icon.
Stack: FastAPI (async) · SQLAlchemy 2 · Postgres 16 + pgvector · Next.js 16 (App Router) + Tailwind · SIFT (tool calling) · OpenRouter · all in Docker Compose.
- Highlights
- Features
- Architecture
- Quick start
- Optional services
- Desktop app
- Documentation
- Security
- Development
- Community
- License
- 🔒 Self-hosted and local-first. Runs entirely in Docker Compose. The only external egress is the model provider and whatever your tools reach. Keys are encrypted in the database.
- 🧠 Custom models. Prompt, parameters, tools, capabilities, filters, voice, memory and sub-agents — all configurable per model, like your own "GPT".
- 🤖 Sub-agents, Claude Code style. The AI delegates to agents you configured or creates its own for the task, runs them in parallel or in the background, and shows each agent's steps and report in the chat.
- 🛠️ Real tools. Web search, page reading, headless browser, charts, quotes, Gmail/Calendar, smart home, GitHub, and Python code you write, running in an isolated sandbox.
- ♾️ Long-term memory with scopes (global / per model / per chat) and shareable stores, plus a knowledge base (RAG) with pgvector.
- ⚡ Automations — schedules and monitors (price, page, search, RSS) that notify you in the app, in the browser (push) or through the channels.
- 💬 Messaging channels. Talk to your models over WhatsApp, Telegram and Discord — each conversation becomes a chat in the sidebar.
- 🔌 OpenAI-compatible public API (
/v1/chat/completions), with per-user keys, limits, quotas, cost control and per-key memory. - 📊 End-to-end observability — every request becomes a trace with latency, database time, reads/writes and LLM calls, in a waterfall panel.
- 🖥️ Desktop app (Windows) with a tray icon, "run in the background" and "start with Windows".
|
Chat & models
Tools (SIFT)
Content & media
|
Memory & knowledge
Automation & channels
Platform & operations
|
The full, detailed list is in docs/features.md.
flowchart LR
subgraph Client
W["Web (Next.js)"]
D["Desktop (Tauri)"]
C["Channels<br/>WhatsApp · Telegram · Discord"]
X["External apps<br/>(API /v1)"]
end
subgraph Backend["Server — FastAPI"]
O["Turn orchestrator<br/>tool-calling · guards"]
SIFT["SIFT<br/>tools"]
MEM["Memory<br/>pgvector"]
RAG["Knowledge Base<br/>(RAG)"]
end
DB[("Postgres 16<br/>+ pgvector")]
OR["OpenRouter<br/>(models)"]
W & D & C & X --> O
O --> SIFT & MEM & RAG
O --> OR
O & MEM & RAG --> DB
The code is organized as a monorepo:
apps/server FastAPI — auth, chat orchestrator, SIFT, memory, RAG, integrations, /v1 API
apps/web Next.js (App Router) — chat interface, workspace, settings
desktop Desktop shell (Tauri) — native window, tray, autostart
infra/ Updater sidecar, proxy and optional service configs
Docker Compose services:
| Service | Default | Port (host) | How to enable |
|---|---|---|---|
db |
✅ | internal | Postgres 16 + pgvector (data + vectors) |
server |
✅ | 8000 |
FastAPI API |
web |
✅ | 41414 |
Next.js interface |
updater |
✅ | internal | Applies "Update now" from the admin panel |
browser |
opt-in | 3009 |
docker compose --profile browser up -d |
Details in docs/architecture.md.
Prerequisites: Docker + Docker Compose.
The installer clones the repository, generates strong local secrets, creates .env and starts
the core stack. Existing .env files are preserved.
curl -fsSL https://raw.githubusercontent.com/Victor-Alves0/AI-Workspace/main/install.sh | bashTo choose another destination, use
curl -fsSL https://raw.githubusercontent.com/Victor-Alves0/AI-Workspace/main/install.sh | AI_WORKSPACE_DIR=/path/to/ai-workspace bash.
Review the script before piping it to Bash if this is a production server.
git clone https://github.com/Victor-Alves0/AI-Workspace.git
cd AI-Workspace
cp .env.example .env
# generate a strong secret and paste it into APP_SECRET in .env:
python -c "import secrets; print(secrets.token_urlsafe(48))"
docker compose up -d --buildOpen https://localhost (the browser warns about the certificate on the first visit — the stack issues its own; see docs/https.md). A first-run wizard creates your admin account and asks whether other people may sign up; then the in-app setup asks for your OpenRouter key (stored encrypted) and a model, and you're chatting.
Database migrations (Alembic) run automatically on server startup. To update later, run
./update.sh(orgit pull && docker compose up -d --build).
Accessing over the local network or a VPS, with a domain + HTTPS, or need backup/restore? It's all in docs/deployment.md.
Heavy features come up on demand via Compose profiles:
# Headless browser (Chromium via browserless) for the browsing tool
docker compose --profile browser up -dThe whole AI Workspace in a native Windows app — no Docker, no server to run. The installer ships the database (Postgres + pgvector) and the backend; everything runs on one local port, with a tray icon, "run in the background", "start with Windows" and in-app updates.
⬇️ Download the installer from the Releases page
(file AI.Workspace_x.y.z_x64-setup.exe, built by CI on every release). Installing over an
existing version updates it in place and keeps your data. Full guide in
docs/desktop.md.
| Document | Contents |
|---|---|
| docs/features.md | Full feature catalog |
| docs/architecture.md | System view, components and the lifecycle of a turn |
| docs/configuration.md | Reference for every environment variable |
| docs/deployment.md | VPS, LAN, HTTPS, backup/restore, updates, secret rotation |
| docs/public-api.md | OpenAI-compatible API + key management |
| docs/security.md | Security model and recommendations |
| docs/remote-terminal.md | Remote Terminal: agent, egress proxy and killswitch |
| docs/desktop.md | Desktop app (Tauri) |
| docs/development.md | Running without Docker, tests, project layout |
| CONTRIBUTING.md | How to contribute |
- Passwords with Argon2; sessions via JWT in an httpOnly cookie (access + rotating
refresh) with
token_versionto revoke all sessions; optional 2FA (TOTP). - Per-user secrets encrypted with Fernet (key derived from
APP_SECRET), with a rotation tool that re-encrypts the database. - CORS restricted to the origins in
WEB_ORIGIN; security headers on every response; HSTS under HTTPS; rate limiting on login/registration and on the public API. - Tool sandbox: code runs in an isolated subprocess with CPU/memory limits.
- Under
APP_ENV=production, the server refuses to start with a weakAPP_SECRET.
Details and the threat model in docs/security.md. Found a vulnerability? See SECURITY.md.
Local setup guide (without Docker), tests and code organization in docs/development.md. To contribute, start with CONTRIBUTING.md.
AI Workspace is built in the open and contributions of every size are welcome.
- 💬 Questions, ideas and show-and-tell: GitHub Discussions
- 🐛 Bugs and feature requests: open an issue
- 🌱 First contribution? Look for
good first issueand read CONTRIBUTING.md - 🌍 Language: the interface ships in English and Portuguese (pt-BR), picked from the browser language (switchable in Settings); translations into other languages are one of the most wanted contributions — strings live in apps/web/locales
- ⭐ If AI Workspace is useful to you, a star helps other people find it
Everyone taking part is expected to follow the Code of Conduct.
AI Workspace is licensed under the GNU Affero General Public License v3.0 (AGPL-3.0). You can use, study, modify and self-host it freely; if you run a modified version as a network service for other people, you must make your changes available under the same license.
