Skip to content

AxonStack/CortexCLI

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Cortex Brain Banner

🧠 Cortex: The Multi-Agent Operating System

License: MIT C++ Local First

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.


⚑ Quick Start (One-Line Install)

Get up and running on Linux in seconds:

curl -sSL https://raw.githubusercontent.com/Sriyush/CortexCLI/main/scripts/install.sh | bash

πŸš€ Key Features

πŸŽ™οΈ Advanced Orchestration

  • 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.

πŸ› οΈ Native Tool Execution

  • File I/O: read_file and write_file (with automatic parent directory creation).
  • Shell Power: run_shell allows agents to execute bash commands directly.
  • Structured JSON: All tool calls follow a strict schema for reliability.

πŸ•΅οΈ Centralized Intelligence Logging

  • Thread-Safe Logging: Real-time activity tracking to logs.txt from 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.

πŸ“– Command Reference

Cortex provides a rich CLI for managing agents, models, and workflows.

1. Global Flags

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).

2. Task Execution

# 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

3. Agent Management (cortex agent)

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.

4. Intel & Monitoring

# View last 50 lines of system logs
cortex logs

# Filter logs for a specific agent
cortex logs qween

# Clearing the audit trail
cortex logs --clear

5. Multi-Agent Workflows

Coordinate 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,Bob

πŸ— Architecture

Cortex 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
Loading

πŸ›  Build from Source

Prerequisites

  • CMake (>= 3.20)
  • GCC (>= 11)
  • ZeroMQ, SQLite3, OpenSSL

Build

mkdir -p build && cd build
cmake ..
make -j$(nproc)

πŸ—‘οΈ Uninstallation

To completely remove Cortex CLI and its configuration:

bash ~/.cortex/CortexCLI/scripts/uninstall.sh

πŸ”„ Updating

To 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 | bash

The script will detect your existing installation and perform a git pull followed by a fresh build.


πŸ“‘ Roadmap

  • 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

πŸ“„ License

MIT Β© 2026 Cortex CLI Team

About

Home of Agents is Here.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • C++ 94.2%
  • CMake 3.4%
  • Shell 2.4%