Self-hosted AI agents that live in your machine, learn from their own past, and guard their own code.
Your own personal AI agent host β isolated, plug-and-play, offline-friendly, and watched over by a live security radar. No SaaS. No telemetry. No lock-in.
self-hosted AI agent Β· self-improving agent memory Β· multi-agent orchestration Β· Telegram AI bot Β· MCP server Β· live code security scanner Β· 100% local-first
git clone https://github.com/flowork-os/Flowork_Agent.git && cd Flowork_Agent && ./start.shOne command. Single binary. Live on http://127.0.0.1:1987 β zero external services.
Quick Start β’ Self-Improving Brain β’ Orchestration β’ Threat Radar β’ vs OpenClaw / Hermes β’ Architecture
Flowork Agent is a microkernel that hosts autonomous AI agents β each one a sandboxed WASM citizen that lives in its own folder with its own persona, tools, schedule, wallet, brain, and private SQLite state. Drop a folder in, restart, and the agent is alive. Pull it out, and it's gone β no global config to untangle.
Each agent doesn't just run β it remembers, learns, dreams, and defends its own mind. And the whole thing is a single Go binary you own end-to-end.
"Simple is hard. Complicated is easy." β the doctrine this project is built on.
Most agents forget everything the moment the chat ends. Flowork agents carry their own mind β and it gets sharper over time.
Every agent has a local brain in its own state.db (SQLite FTS5) β not a shared cloud, not the router. It keeps working even if the network dies. The brain is a full learning loop:
| Layer | What it does | |
|---|---|---|
| π | Local memory | brain_add / brain_search β the agent stores and recalls its own experience via fast FTS5 keyword search. Local-first, no embeddings, no cloud. |
| π | Constitution | Sacred, always-injected rules β a 5W1H gate, identity guard, and anti-hallucination doctrine baked into every prompt. |
| π | Mistakes recall | The agent logs its errors with a hit-count and recalls past mistakes before repeating them: "last time you broke X, the fix was Y." |
| π | Dream | While idle, a rule-based pass consolidates recurring patterns into eureka insights β the brain grows richer from the agent's own history. |
| π‘οΈ | Immune system | An antibody scanner quarantines prompt-injection / jailbreak / low-confidence drawers so the brain never gets poisoned. |
| π | Federation | Agents can promote their best, vetted knowledge to a shared brain so peers learn from each other β fully optional, works offline. |
Why "isolated" matters: the brain travels with the agent folder. Clone it, ship it on a USB, run it on another machine β it brings its memory, skills, and dreams. Knowledge is portable and fork-able, Linux-style. One agent β one shared mind β one agent = its own experience.
| Feature | What it does | |
|---|---|---|
| π€ | Plug-and-play agents | Each agent = a portable folder (WASM + manifest + isolated state.db). Install/remove by dropping a folder. True sandbox isolation via WASI. |
| π§ | Self-improving brain | Per-agent local memory, constitution, mistakes recall, dream consolidation, and an immune system. (details β) |
| π§ | Mr.Flow orchestrator | A built-in router agent: chat it in plain language and it auto-dispatches a multi-agent task and delivers the verdict back. (details β) |
| π€ | Category Tasks (multi-agent crew) | Define a crew once β researchers fan out in parallel, a synthesizer fuses their findings into one grounded decision. |
| β° | Recurring scheduler | Cron-style automation: "every day at 9 AM, analyze stock A and send the decision to Telegram." Set it, forget it. |
| π | MCP server | Expose your agents to external AI β Claude Desktop, Claude Code, Cursor β over standard Model Context Protocol. |
| π₯οΈ | Operator agents | A capability-gated agent can operate the host (shutdown / reboot / sleep / lock) on confirmed command β armed, audited, isolated. |
| π₯οΈ | Terminal TUI | A console cockpit to list / run / review tasks with a live step timeline β same pipeline as the GUI. |
| π‘οΈ | Threat Radar | A live background security scanner with a hacker-style radar UI. Auto-scans your code the moment it changes. (details β) |
| π¬ | Telegram-native | Ship an agent as a Telegram bot in minutes β long-poll updates, persona, multi-turn conversation memory, slash commands. |
| π | Crypto wallet | Live multi-chain portfolio (Etherscan + CoinGecko) β ETH/Polygon/Arbitrum, ERC-20 tracking, balance alerts. |
| π° | Finance & budgets | Per-agent LLM cost ledger, budget guardrails, spend dashboard. |
| π | File Protector (HPG) | Host Protection Gate β immutable rules block destructive ops (rm -rf /, secret exfil, metadata pivots) before they run. |
| πΊοΈ | Codemap | Force-directed dependency graph of your codebase β health scores, import edges, file viewer. |
| βοΈ | Owner Settings | Single-owner auth (bcrypt + session), API keys, personal wallet, notifications β kept separate from agents so agents stay portable. |
| π | Audit everything | Append-only audit log, decisions journal, karma/reputation, retention policy. |
Love self-hosted personal AI agents like OpenClaw or Hermes Agent? Flowork plays in the same yard β agents you own, that live on your machine, talk over Telegram, grow skills, and remember you. Here's where Flowork is different:
| OpenClaw / Hermes | Flowork Agent | |
|---|---|---|
| Memory | session memory / learning loop | per-agent isolated brain that travels with the folder (portable, fork-able) |
| Security | β | live Threat Radar scans your code on every change (secrets, SQLi, SSRFβ¦) β nobody else ships this |
| Anti-hallucination | prompts / guidance | constitution + immune system that quarantines poisoned memory by design |
| Runtime | Node / Python | single Go binary, WASM-sandboxed agents (WASI isolation), pure-Go SQLite |
| Footprint | β | anti-over-prompt budget: 5 core tools, the rest discovered on demand |
Not a fork, not a clone β a different bet: isolation, security, and portability first. If you want an agent that defends its own mind and your codebase, you're home.
The feature that makes Flowork feel like a hacker movie β and keeps your code honest. No other agent framework ships a live security scanner.
- Background watch: the moment you (or an AI) edit a
.go/.py/.jsfile, it gets auto-scanned. No CI server, no waiting. - Real auditors: hardcoded secrets (AWS/GitHub/Google/Stripe/Slack/JWT/private-key by value), SQL injection, command injection, SSRF, weak crypto, mutex/deadlock, resource leaks, path traversal, and more.
- Radar UI: animated sweep, severity blips, live scan log, status
SECURE / NOTED / WARNING / THREAT. - Telegram alerts: critical/high findings get pushed straight to your phone.
Every fix gets re-scanned automatically β so a patch that opens a new hole gets caught before it ships.
One message in. A whole crew gets to work. One grounded answer out.
Most "AI agents" are a single model in a loop. Flowork runs a team. Talk to Mr.Flow β the built-in orchestrator β and it decides whether to answer directly or assemble a crew:
You (Telegram / GUI / MCP / TUI)
β "analyze stock GOTO"
βΌ
π§ Mr.Flow ββ routes βββΊ π Category Task
β
ββββββββββββββββββββββΌβββββββββββββββββββββ
βΌ βΌ βΌ
π Fundamentals π Technicals π° Sentiment (crew fans out)
ββββββββββββββββββββββΌβββββββββββββββββββββ
βΌ
π§© Synthesizer βββΊ β
Decision βββΊ π² back to you
- π§ Smart routing: plain chat β Mr.Flow auto-triggers the right task and threads delivery back to you.
- π€ Real crews: each member is an isolated agent with its own tools, persona, and brain. They research independently; a synthesizer fuses everything into one sourced decision.
- ποΈ Build crews from the GUI: a visual Task Builder defines categories + crews. Every run has a live step timeline.
- π Four front doors, one funnel: drive the same pipeline from Telegram, the GUI, an MCP client (Claude/Cursor), or the terminal TUI.
- π² No ghosting: when a task completes, the result is delivered β logged at every hop.
Every agent ships with a deep toolbox β 120+ registered tools across 10+ domains: memory & brain, file & code, agent ops, audit & journaling, security, wallet & finance, scheduler, skills, federation, and more.
Anti-overprompt by design: only 5 core tools auto-inject into the prompt β the rest are discovered on demand via
tool_search. 120+ tools in the shed, never dumped on the LLM at once. Smaller prompts, fewer hallucinations, lower cost.
git clone https://github.com/flowork-os/Flowork_Agent.git
cd Flowork_Agent
./start.sh # builds + launches on http://127.0.0.1:1987Open http://127.0.0.1:1987, set your owner password, and you land straight on the Threat Radar. Single binary, embedded kernel, zero external services required.
One-click desktop launchers (
flowork-start.desktop/flowork-restart.desktop) included. Background scanner + scheduler + brain-dream cron all start automatically.
Optional power-ups (Settings β API Keys / Notifications):
- Telegram bot token + chat ID β chat your agent + owner alerts
ETHERSCAN_API_KEYβ live wallet balances
βββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ
β Flowork Agent (:1987) β HTTP β Flowork Router (:2402) β
β per-citizen state + brain β ββββββΊ β collective LLM brain β
β β β β
β β’ WASM microkernel (wazero)β β β’ multi-provider gatewayβ
β β’ isolated state.db + brainβ β β’ shared knowledge corpusβ
β β’ Threat Radar scanner β β β’ routing + pricing β
β β’ Telegram daemon β β β
βββββββββββββββββββββββββββββββ ββββββββββββββββββββββββββββ
- Portable: an agent is a folder β brain, skills, and dreams travel with it. Move it, USB it, run it anywhere.
- Nano-modular: one file, one job. Drop-in tools register themselves.
- Multi-OS: Linux, macOS, Windows. No CGO (pure-Go SQLite).
- Isolated: agents can't read each other's state. Router down? Agents keep their full local brain.
For multi-provider LLM routing, a shared knowledge corpus, cost-aware model selection, and mesh sync, run Flowork Agent with its sibling:
The Agent works fully standalone (local brain + your own LLM keys). With the Router it also gets a collective corpus and a smart gateway. Install both for the full experience.
Go 1.25 Β· wazero (WASM) Β· modernc SQLite (WAL + FTS5) Β· fsnotify Β· bcrypt Β· vanilla-JS GUI Β· zero heavy deps.
self-hosted AI agent Β· self-improving AI agent Β· agent memory Β· local-first AI Β· personal AI assistant Β· autonomous agent framework Β· multi-agent orchestration Β· agent crew Β· AI orchestrator Β· Telegram AI bot Β· MCP server Β· Claude Code Β· LLM agent Β· recurring agent scheduler Β· WASM microkernel Β· Go agent runtime Β· LLM gateway Β· code security scanner Β· secret scanner Β· SAST Β· prompt-injection defense Β· crypto wallet agent Β· plug-and-play AI Β· offline AI agent Β· sandboxed agents Β· OpenClaw alternative Β· Hermes agent alternative
MIT Β© Aola Sahidin (Mr.Dev). Built to outlive its maker β an AI home that keeps running.