Open-source AI Agent Operating System — CLI, API, web UI, and marketplace.
CortexPrism v0.53.0 is a runtime for building, deploying, and managing AI agents. It provides a unified interface to 30 LLM providers, a 5-tier memory system with hybrid retrieval, sandboxed code execution, defense-in-depth security, multi-user collaboration with teams and API tokens, instance federation, and a plugin marketplace — all running locally on your machine.
- Agent Loop — Multi-turn reasoning with tool orchestration, memory injection, and reflection
- Multi-Provider — Anthropic, OpenAI, Google, Groq, Mistral, DeepSeek, Ollama, and more
- Memory — 5 tiers: episodic, semantic, reflection, graph, skills with FTS5 + vector hybrid retrieval
- Security — Parallax 3-stage validation gate, encrypted vault, audit logging, DLP guard, AI guardrails
- Web UI — Overhauled dashboard with dark/light theme, experience levels, horizontal top nav, real-time streaming
- Plugins — Extend via ESM modules, MCP servers, or WebAssembly
- Marketplace — Discover and publish plugins and agent configs
- REST API — Full HTTP API with OpenAPI 3.1 specification and Swagger UI
- Data Import — Migration from OpenClaw, Hermes, and ZeroClaw with config, sessions, and memory
git clone https://github.com/CortexPrism/cortex.git
cd cortex
deno run --allow-all src/main.ts setup
cortex agent chatVisit cortexprism.io to explore the marketplace and full documentation.
Chat with 30 LLM providers through a unified interface. Switch providers mid-session, configure fallback chains, stream responses. Uses the overhauled TUI with 12 slash commands.
cortex agent chat --model claude-sonnet-4-20250514
Agents use 60+ tools (code execution, file I/O, web search, browser automation) through configurable approval gates. Audit every call.
cortex agent chat
Import config, sessions, and memory from OpenClaw, Hermes, and ZeroClaw. One command migrates your entire setup.
cortex import openclaw
Episodic → Semantic → Reflection → Graph → Skills. Hybrid FTS5 keyword search + cosine vector similarity with exponential time decay.
cortex memory search --query "deployment config" --tier semantic
3-stage validation: tool name → shell command → domain rules. AES-256-GCM encrypted vault. Full audit trail via Cortex Lens.
cortex policy add --allow code.execute.python
Run Python, JavaScript, Wasm, and shell commands in isolated Docker sandboxes (subprocess fallback). E2B and Daytona remote backends supported. Resource limits enforced.
cortex sandbox run --lang python --file analyze.py
Automatic model selection by task complexity with cost optimization and graceful failover across providers.
cortex chat --router cost-optimized
Three plugin architectures: ESM modules (JS/TS), MCP servers (stdin/stdio or HTTP/SSE), WebAssembly (Rust, Go, C). Supply chain verification with SHA-256 hashing. Plugin marketplace for discovery.
cortex plugins install marketplace:cortexprism.io/plugins/python-executor
Persistent background daemon with validator, executor, and scheduler processes. CRON job scheduling with auto-restart.
cortex daemon start && cortex jobs add --schedule "0 9 * * 1" --task weekly-report
Overhauled web dashboard with dark/light theme toggle, horizontal top nav (5 categories, 40 pages), experience levels, chat, Lens, Memory, and Jobs tabs. REST API + WebSocket for real-time streaming.
cortex server start --port 8080
Multiple agent profiles with custom souls, system prompts, tool assignments, and provider configurations. Agent-to-agent collaboration.
cortex agent create --name code-reviewer --model claude-sonnet-4-20250514
┌─────────────────────────────────────────────────────────────────┐
│ CortexPrism v0.50.0 │
│ │
│ CLI (cortex agent / sandbox / server / import / ...) │
│ │ │
│ ▼ │
│ ┌─────────────────────────────────────────────┐ │
│ │ agent/loop.ts │ │
│ │ userMessage → [memory inject] → LLM call │ │
│ │ → [tool parse] → [validator] → [execute] │ │
│ │ → [re-prompt loop] → response │ │
│ │ → [episodic write] → [reflection] │ │
│ └─────────────────────────────────────────────┘ │
│ │ │
│ ┌──────┼──────────────────────────────────────────────────────┐│
│ │ │ Subsystems ││
│ │ memory/ tools/ sandbox/ security/ llm/ ││
│ │ server/ scheduler/ plugins/ qm/ memori/ ││
│ │ skills/ codegraph/ channels/ chrome-bridge/ ││
│ └──────────────────────────────────────────────────────────────┘│
│ │
│ SQLite databases (WAL mode) │
│ cortex.db · memory.db · lens.db · vault.db · sessions/*.db │
└─────────────────────────────────────────────────────────────────┘
| Component | Description |
|---|---|
| Agent Loop | Core reasoning + tool loop — LLM calls, tool execution, memory, reflection, metacognition |
| Memory System | 5-tier memory with hybrid FTS5 + vector embedding retrieval, entity graph, cross-agent context |
| LLM Layer | 30 providers with unified interface, Model Quartermaster (6-signal prediction), cost optimizer |
| Tool System | 60+ built-in tools with extensible registry, Quartermaster tool orchestration learning |
| Security (Parallax) | 3-stage policy gate, LLM supervisor, encrypted vault, DLP guard, AI guardrails, audit logging |
| Sandbox | Docker, subprocess, E2B, Daytona backends with resource limits |
| Web UI | Overhauled dark/light theme dashboard with 40 pages, experience levels, horizontal top nav |
| Daemon Supervisor | Background process manager with validator, executor, scheduler |
| HTTP Server | REST API + WebSocket + real-time streaming |
| Scheduler | SQLite-persisted CRON job scheduler with retry and stale recovery |
This repository hosts cortexprism.io — the official CortexPrism website. It includes:
| Section | Path | Pages | Description |
|---|---|---|---|
| Getting Started | /getting-started | 4 | Quickstart, installation, first run, configuration |
| CLI Reference | /docs/cli | 12 | Every cortex command documented |
| Architecture | /docs/architecture | 8 | Agent loop, memory, security, router, daemon, plugins, databases |
| Developer Guide | /docs/developer-guide | 10 | Plugin types, ESM/MCP/WASM dev, API, agents, publishing, standards |
| Knowledge Base | /docs/knowledge-base | 9 | FAQ, troubleshooting, best practices, provider guide, security, performance |
| Design Docs | /docs/design-docs | 1 | Links to design specifications in the main repository |
Discover, publish, and manage plugins and agent configurations.
| Path | Description |
|---|---|
| /marketplace | Browse approved plugins and agents |
| /marketplace/plugins | Plugin listing with search, category filters, pagination |
| /marketplace/plugins/:id | Plugin detail with screenshots, reviews, install instructions |
| /marketplace/agents | Agent configuration listing |
| /marketplace/agents/:id | Agent detail with reviews and download |
| /marketplace/publish/plugin | Submit a plugin to the marketplace |
| /marketplace/publish/agent | Submit an agent configuration |
| Path | Description |
|---|---|
| / | Landing page with GitHub stats, marketplace counts, features |
| /features | Detailed feature breakdown with CLI examples |
| /about | About CortexPrism |
| /security | Security overview and disclosure |
| /use-cases | Use case examples |
| /install | Installation instructions |
| /login | User login |
| /register | User registration |
| /dashboard | User dashboard (submissions, profile) |
| /admin | Admin panel (approve/reject submissions) |
| /changelog | Release history |
| /contribute | Contributing guide |
| /docs | Documentation hub |
| /getting-started | Getting started guide |
| /openapi | Swagger UI for the REST API |
| /profile/:username | Public user profile |
| Layer | Choice |
|---|---|
| Framework | Next.js 14 (App Router) |
| Language | TypeScript |
| Styling | Tailwind CSS 3 |
| UI Components | Radix UI (Dialog, Dropdown, Select, Tabs), Lucide icons |
| Database | SQLite via Prisma 5 |
| Auth | JWT + bcryptjs |
| Content | MDX with react-markdown + remark-gfm |
| Search | Fuse.js (client-side) |
| Charts | Recharts |
| API Docs | swagger-ui-react + OpenAPI 3.1 |
| Data Fetching | SWR |
| Validation | Zod |
| Deployment | Docker / systemd + nginx |
The marketplace exposes a REST API consumed by the web UI and external Cortex instances. Full documentation is available via Swagger UI at /openapi or the raw spec at /api/docs/openapi.json.
| Method | Path | Description |
|---|---|---|
GET |
/api/marketplace/plugins |
List approved plugins (search, filter, paginate) |
GET |
/api/marketplace/plugins/:id |
Plugin detail |
GET |
/api/marketplace/plugins/:id/download |
Download manifest (increments counter) |
POST |
/api/marketplace/plugins |
Submit a plugin (requires auth) |
GET |
/api/marketplace/agents |
List approved agent configs |
GET |
/api/marketplace/agents/:id |
Agent detail |
GET |
/api/marketplace/agents/:id/download |
Download agent config |
POST |
/api/marketplace/agents |
Submit an agent (requires auth) |
GET |
/api/marketplace/categories |
List categories |
GET |
/api/marketplace/stats |
Marketplace statistics |
GET |
/api/docs/openapi.json |
OpenAPI 3.1 spec |
| Method | Path | Description |
|---|---|---|
POST |
/api/auth/register |
Create account (email, username, password) |
POST |
/api/auth/login |
Login, returns JWT token |
GET |
/api/auth/me |
Get current user (requires Bearer token) |
| Method | Path | Description |
|---|---|---|
GET |
/api/user/submissions |
User's plugins and agents with status |
| Method | Path | Description |
|---|---|---|
GET |
/api/admin/submissions/plugins?status=pending |
List pending plugins |
PUT |
/api/admin/submissions/plugins |
Approve or reject a plugin |
GET |
/api/admin/submissions/agents?status=pending |
List pending agents |
PUT |
/api/admin/submissions/agents |
Approve or reject an agent |
content/ # MDX documentation files (42 pages across 6 sections)
prisma/ # Schema + seed data + SQLite database
public/ # Static assets (images, favicon)
src/
app/
api/ # REST API routes (auth, marketplace, admin, user)
admin/ # Admin panel (submission review)
changelog/ # Release history
contribute/ # Contributing guide
dashboard/ # User dashboard
docs/ # Documentation pages (MDX-rendered)
features/ # Features page
getting-started/ # Getting started guides (MDX-rendered)
login/ # Login page
marketplace/ # Marketplace (plugins, agents, publish forms)
openapi/ # Swagger UI
register/ # Register page
components/ # React components (29 components)
layout/ # Navbar, Footer, Sidebar
landing/ # Hero, FeatureGrid, StatsBar, CTA
docs/ # MdxContent, TableOfContents, DocSearch, CodeBlock
marketplace/ # Cards, details, forms, search, reviews
shared/ # Badge, Button, Card, Pagination, StarRating
lib/ # Utilities (prisma, auth, openapi, github, markdown)
middleware.ts # CORS middleware
- Node.js 20+
- npm
npm install
npm run db:generate
npm run db:pushnpm run devThe dev server runs on http://localhost:3001.
npm run db:generate # Generate Prisma client
npm run db:push # Push schema to SQLite
npm run db:studio # Open Prisma Studionpm run lintnpm run buildThe build script produces a standalone .next directory with static assets and the SQLite database bundled.
systemctl restart cortexprism-web.serviceThe Discord bot is a standalone service in discord-bot/:
cd discord-bot
npm install # also runs db:generate (generates Prisma client and copies it locally)
# Register slash commands (run once)
npx tsx src/deploy-commands.ts
# Start bot
npx tsx src/index.tsdocker compose up --build -dThe Dockerfile uses multi-stage build with Next.js standalone output. The docker-compose.yml includes nginx reverse proxy on port 443.
| Variable | Default | Description |
|---|---|---|
DATABASE_URL |
file:./prisma/marketplace.db |
SQLite database path |
JWT_SECRET |
(auto-generated) | Secret for JWT token signing |
NEXT_PUBLIC_SITE_URL |
https://cortexprism.io |
Canonical site URL |
NEXT_PUBLIC_GITHUB_REPO |
CortexPrism/cortex |
GitHub repo for stats |
NEXT_PUBLIC_CORTEX_VERSION |
(auto-detected) | Override displayed CortexPrism version |
DISCORD_CLIENT_ID |
— | Discord OAuth app client ID |
DISCORD_CLIENT_SECRET |
— | Discord OAuth app client secret |
NEXT_PUBLIC_DISCORD_CLIENT_ID |
— | Discord OAuth app client ID (public) |
DISCORD_BOT_TOKEN |
— | Discord bot token for slash commands |
DISCORD_GUILD_ID |
— | Guild ID for guild-specific command registration |
DISCORD_SUBMISSION_WEBHOOK_URL |
— | Webhook URL for marketplace submission notifications |
DISCORD_ADMIN_IDS |
— | Comma-separated Discord user IDs with bot admin access |
Cortex instances consume the marketplace API to discover and install plugins. The MARKETPLACE-INTEGRATION.md document details:
marketplace:URI scheme for plugin references- Plugin manifest and agent config data contracts
- Installation and download flows
- CORS policy
Contributions of all kinds are welcome — bug reports, feature requests, documentation improvements, and plugin development.
- Issues: github.com/CortexPrism/cortex/issues
- Pull Requests: github.com/CortexPrism/cortex/pulls
- Discord: Join the community
- Plugin Development: See the Developer Guide and Submission Standards
MIT