Why I built a self-hosted AI agent OS instead of using LangChain or CrewAI
I spent months trying to build an autonomous agent system using existing tools. The pattern I kept running into:
- LangChain gives you the agent loop. You build everything else: UI, persistence, sandboxing, security, channel bots, multi-agent coordination. Every upgrade broke something in my glue code.
- CrewAI nails multi-agent roles but inherits LangChain's dependency tree and has no web UI, no persistent memory, no security model.
- OpenAI Assistants is polished but locked to one provider, no customization of the agent loop, no multi-agent, and data residency is their problem.
So I built CortexPrism — a self-hosted AI agent operating system. Single Deno binary, zero external runtime dependencies, Apache 2.0 licensed.
What's different:
Instead of a library you build on top of, it's a complete OS for agents. The agent loop, memory, tools, web UI, IDE editor, security, and channel adapters all work together because they were built to work together.
- 10 built-in agent profiles with HEXACO personality configuration and specialized tool sets — Assistant, Developer, Researcher, Architect, Analyst, Writer, DevOps, Security, Code Reviewer, QA/Tester
- 5-tier persistent memory — episodic (FTS5), semantic (vector), skills, graph (D3 interactive visualization), reflection (meta-patterns). Hybrid BM25 + vector search with time-decay scoring and checkpoint time-travel
- 60+ built-in tools — web search, sandboxed code execution, Playwright browser automation, Chrome Bridge, GitHub, voice, computer use, file_diff
- 6 multi-agent orchestration strategies — sequential, parallel, debate, review-loop, hierarchical, graph — backed by 13 sub-agent types
- Runtime tool forging — agents can create, test, and export TypeScript tools at runtime with safety scanning
- 30 LLM providers — Claude, GPT, Gemini, Ollama, Groq, DeepSeek, OpenRouter, Replicate, Cloudflare, DeepInfra, Hyperbolic, MiniMax, Zhipu, and 18 more — with cascade routing (start cheap, escalate when confidence is low)
- Parallax security — regex policy validator, LLM security supervisor, human approval modals, SSRF protection, AES-256-GCM vault, AgentLint (33+ static audits), Dependency Guardian CVE monitoring, append-only audit lens
- Full web UI — 40+ pages, streaming chat, IDE-style code editor, memory graph, prompt lab with A/B testing, sessions tree, node/swarm dashboard
- Custom TUI framework — double-buffered virtual screen, emacs keybindings, 3 themes
- Distributed swarm — multi-instance orchestration via Google A2A protocol
- WASM plugin runtime — compile from C, Rust, or Zig with ABI versioning and supply-chain scanning
- Multi-user collaboration — users (PBKDF2), teams, API tokens (SHA-256), federation
- 9 channel adapters — Discord, Slack, Telegram, Teams, Mattermost, Rocket.Chat, WhatsApp, Google Chat, Lark
- Zero telemetry — everything runs locally on your hardware
The design philosophy: Cohesive beats composable. A single binary where everything works together beats 6 libraries that you stitch together and hope don't break on the next upgrade.
Stack: Deno 2.x (strict TypeScript) · SQLite (WAL mode) via libSQL · tree-sitter WASM (14+ language parsing) · CodeMirror 6 · AES-256-GCM + PBKDF2
Install (macOS/Linux):
curl -fsSL https://cortexprism.io/install.sh | bash
cortex setup && cortex serve
# Open http://localhost:3000
GitHub: https://github.com/CortexPrism/cortex
Apache 2.0 · Zero telemetry · Contributions welcome