Streaming chat across providers
Anthropic, OpenAI, Gemini, DeepSeek, GLM. One chat surface, swap models per-message, watch tokens stream in real time.
Nabu is a self-hosted, self-improving AI agent platform. It writes its own memory, builds its own skills, schedules its own work, and gets better the more you use it. One Postgres for everything. Zero hosted dependencies.
The self-improvement loop
Three tiny pieces, working together: a runner with a frozen system-prompt snapshot, post-run hooks that mutate the agent’s own brain, and a compactor that keeps the context lean.
User prompt → runner orchestrates one agent turn. Frozen brain block, persona block, todo block, and active skills are injected at run start.
compactor watches token count · rolls up at 70%
Post-run hooks scan the transcript. The memory-extractor upserts durable facts. The skill-curator proposes new skills. The workshop scores existing skills and patches them.
memory-extractor · skill-curator · skill-workshop · auto-title
The next prompt rebuilds the system prompt with the updated brain and new skills available as tools. The agent starts richer than it finished. The cycle compounds.
frozen prompt snapshot · prefix-cache hit · cheaper tokens
Capabilities
Twelve surfaces, built on top of one Fastify api and one Postgres. Each one is a real, shipped feature you’ll see the moment you log in.
Anthropic, OpenAI, Gemini, DeepSeek, GLM. One chat surface, swap models per-message, watch tokens stream in real time.
Every conversation extracts durable facts into a per-user brain that’s frozen into the system prompt of every future run.
After a non-trivial task, an auto-curator proposes a reusable markdown skill. A workshop scores skills and patches them.
Cron-driven agent runs in fresh sessions. Drill into every step, retry from any point, get push-notification failure alerts.
An auxiliary LLM summarizes the middle of long conversations while protecting head and tail. No truncation surprises.
Persistent Kasm Chrome session you can log into via noVNC. The agent drives the same browser via Chrome DevTools Protocol.
Bring any Model Context Protocol server. OSV malware scan blocks compromised npx/uvx packages before install.
Each model row carries its $/1k in/out/cache-read price. Analytics rolls up daily spend, top skills, slowest queries.
Toggle deep-researcher / concise-coder / devil’s-advocate per chat. Drive the composer with /skill, /recall, /memory, /cron new.
Every WebSocket event is durably logged before broadcast. Reconnect-with-resume via eventId means no event is ever lost.
Google Drive search/read out of the box. Drag-drop image, PDF, DOCX uploads with live text extraction preview.
100dvh layout, safe-area insets, momentum scroll, slide-in drawer. Installable on iOS, Android, desktop.
In the app
A clean, opinionated PWA built on Next.js 15 + Tailwind v4 + lucide-react. Slash menu in the composer, brain pulse in the topbar, persona switcher per chat, drag-drop attachments, inline diffs in the assistant bubble.
--- name: extract-pr-summary description: Distill a PR diff into a 5-line changelog entry. score: 0.86 (used 14×) --- ## Steps 1. Read PR title + body. 2. For each file, summarize hunks. 3. Group by area (api/db/ui). 4. Output as bullet changelog.
Architecture
Nabu deliberately runs on a tiny, opinionated stack. There is no Redis, no message broker, no third-party state store. Every piece is something you already know how to operate.
vs. the alternatives
Most “self-hosted AI” tools are chat surfaces in front of someone else’s API. Nabu is the runner, the memory, the skills, the scheduler, the browser, and the cost tracker — under one license, on your hardware.
| capability | Nabu | ChatGPT | Claude.ai | Cursor | Open WebUI |
|---|---|---|---|---|---|
| Self-hosted on your hardware | |||||
| Auto-extracts memory from conversations | |||||
| Writes its own reusable skills | |||||
| Schedules itself with cron + run history | |||||
| Real persistent browser the agent drives | |||||
| Native MCP server registry per user | |||||
| Per-model cost tracking baked in | |||||
| One database — no Redis, no broker |
Security
An agent platform is a privileged piece of software. Nabu treats every input — prompts, schedules, memory writes, MCP tools, outbound URLs — as untrusted and runs each through a dedicated guard.
Provider keys and MCP env values are sealed with AES-256-GCM. Key derives from NABU_SECRET_KEY (or JWT_SECRET as fallback). Plaintext never touches disk.
Cron prompts and memory writes are scanned with the Hermes regex set before persistence. Adversarial inputs never make it into the brain.
Before installing any npx or uvx MCP server, api.osv.dev is queried for known compromises. Anything tagged MAL-* is blocked at install time.
web_fetch, connectors, and MCP outbound URLs are pre-checked. Requests to RFC1918, CGNAT, link-local, and cloud-metadata IPs are refused.
Rotating refresh tokens for sessions. Passwords land as scrypt hashes. The default admin password must be changed before the box is reachable.
Memory, skills, schedules, and settings are scoped per user. Tools merge from per-user MCP servers. There are no shared prompt-injection vectors.
Quickstart
A single docker compose brings up Postgres, the Fastify api, the Next.js PWA, and the persistent browser. Bind-mounts to ./.nabu/data make every byte yours to back up, move, or rip out.
# Clone & generate secrets
$ git clone https://github.com/drddavi/nabuagent && cd nabuagent
$ bash _scripts/setup.sh
# Add at least one provider key in .env
# PROVIDER_ZAI_API_KEY=... ANTHROPIC_API_KEY=... OPENAI_API_KEY=...
# Bring everything up
$ docker compose up -d --build
# Open the app
$ open http://localhost:9001
FAQ
If something is missing here, the README and CLAUDE.md in the repo go deep into every architectural choice. The whole stack is open.
Open source, AGPL-3.0, runs on a laptop, scales to a workstation. The agent gets sharper every time you use it — and you keep the only copy.
AGPL-3.0 · 2 GB disk · zero hosted dependencies