Cortex is a high-performance, local-first multi-agent orchestration framework built in C++20. It's not just a wrapper; it's an environment where agents live, think, and collaborate via a low-latency messaging bus.
Get up and running on Linux in seconds:
curl -sSL https://raw.githubusercontent.com/Sriyush/CortexCLI/main/scripts/install.sh | bash- Orchestration Agent: A "Manager" agent that breaks down tasks and delegates them to specialized workers.
- Dynamic Delegation: Agents can assign sub-tasks to each other, forming a hierarchy of intelligence.
- Robust Tool Detection: Intelligent parsing of agent responses, handling strict JSON fences or raw output.
- File I/O:
read_fileandwrite_file(with automatic parent directory creation). - Shell Power:
run_shellallows agents to execute bash commands directly. - Structured JSON: All tool calls follow a strict schema for reliability.
- Thread-Safe Logging: Real-time activity tracking to
logs.txtfrom all agents. - System Redirection: Captures ALL console output (
stdout/stderr) into the log file for full auditability. cortex logs: Dedicated command to view/monitor agent activities and tool results.
Cortex provides a rich CLI for managing agents, models, and workflows.
| Flag | Description |
|---|---|
-d, --dashboard |
Launches the real-time TUI dashboard. |
--version |
Shows the current version of Cortex CLI. |
-m, --model <name> |
Selects the LLM model for the specific command. |
--provider <name> |
Sets the provider (ollama, openai, gemini, claude). |
--ollama-url <url> |
Sets the Ollama API endpoint (default: http://localhost:11434). |
# Run a single task with an agent
cortex run "Create a new folder 'scaffold' and add a main.cpp" -a qween
# Optional: Save the agent's response to an output file
cortex run "Explain quantum computing" -o quantum.md| Command | Description |
|---|---|
create <name> <type> |
Creates a new agent (Types: researcher, coder, critic, generic). |
list |
Lists all agents and their types. |
start <name> |
Boots up an agent process. |
stop <name> |
Safely shuts down an agent. |
delete <name> |
Removes an agent from the environment. |
# View last 50 lines of system logs
cortex logs
# Filter logs for a specific agent
cortex logs qween
# Clearing the audit trail
cortex logs --clearCoordinate multiple agents on complex topics or goals.
# Start a live debate between agents
cortex debate start --topic "C++ vs Rust" -p Alice -p Bob
# End all active debates
cortex debate stop
# Team-based goal execution
cortex work -g "Design a high-performance ZMQ bus" -a Alice,BobCortex uses a Hub-and-Spoke messaging architecture powered by ZeroMQ.
graph TD
CLI[Cortex CLI] <--> Bus[ZMQ Message Bus]
Bus <--> Orchestrator[Orchestrator Agent]
Orchestrator -- delegates --> Coder[Coder Agent]
Orchestrator -- delegates --> Researcher[Researcher Agent]
subgraph "Agent Core"
Coder --> Tools[Tools: Shell/File]
Coder --> Memory[(SQLite Memory)]
Coder --> LLM[LLM: Ollama/OpenAI]
end
- CMake (>= 3.20)
- GCC (>= 11)
- ZeroMQ, SQLite3, OpenSSL
mkdir -p build && cd build
cmake ..
make -j$(nproc)To completely remove Cortex CLI and its configuration:
bash ~/.cortex/CortexCLI/scripts/uninstall.shTo update Cortex CLI to the latest version, simply re-run the installation command:
curl -sSL https://raw.githubusercontent.com/Sriyush/CortexCLI/main/scripts/install.sh | bashThe script will detect your existing installation and perform a git pull followed by a fresh build.
- Phase 1: ZeroMQ Bus & Ollama Core Integration
- Phase 2: Persistent Memory & Per-Agent LLM Config
- Phase 3: Structured JSON Message Schemas
- Phase 4: Advanced Logging & Shell/File Tool Execution
- Phase 5: Multi-Agent Task Orchestration & Delegation
- Phase 6: Agent Memory (SQLite + Vector Embeddings)
- Phase 7: PID-based Process Management & Cluster Control
- Phase 8: Extension SDK (Python) & Plugin Ecosystem
MIT Β© 2026 Cortex CLI Team
