Newer
Older
cortex-hub / README.md

๐Ÿง  Cortex Hub: Autonomous AI Agent Mesh & Orchestrator

Cortex Hub is a state-of-the-art, modular AI orchestration platform that bridges the gap between Large Language Models (LLMs) and local execution via a distributed Agent Node Mesh. It features a modern React-based workspace, a powerful Skill System, and advanced RAG (Retrieval-Augmented Generation) capabilities.

โœจ Key Features

  • ๐ŸŒ Distributed Agent Mesh: Connect multiple local or remote nodes (Linux, macOS, Windows) to your Hub. Each node can execute tasks, manage files, and provide terminal access.
  • ๐ŸŒ Dedicated Browser Service: High-performance browser automation (Playwright) running as a dedicated system service. Centralized execution for reduced latency and reduced node footprint.
  • ๐Ÿ› ๏ธ Extensible Skill System: Orchestrate AI capabilities via "Skills" (Terminal Control, File Management, System Analysis). Dynamic permissioning allows granular control over which users or groups can access specific nodes and skills.
  • ๐Ÿ“‚ Private RAG Pipeline: Securely ingest documents into a FAISS vector store to ground AI responses in factual, local data.
  • ๐Ÿ” Industrial-Grade Security: Integrated with OIDC (OpenID Connect) for secure user authentication and Role-Based Access Control (RBAC).
  • ๐Ÿ–ฅ๏ธ Unified Command Center: A sleek, premium React frontend for managing sessions, configuring nodes, and monitoring the swarm in real-time.

๐Ÿ’ฌ How to Use

1. Connecting Nodes

Download the Agent Node Bundle from the "Nodes" page in the dashboard. Unzip and run ./run.sh (Linux/macOS) or run.bat (Windows). The node will automatically connect to your Hub using the pre-configured security token.

2. Using Skills

Skills like Browser Automation and Terminal Control are available directly in your chat sessions. You can attach specific nodes to a session to give the AI hands-on access to those environments.


๐Ÿš€ Quick Start (Local Development)

The easiest way to get started is using the pre-configured Dev Container or local Docker Compose.

Prerequisites

  • Docker & Docker Compose
  • Python 3.11+ (if running without Docker)
  • Node.js 18+ (for frontend development)

1. Configure Secrets & Keys

Most configurations and API Keys (Gemini, DeepSeek, TTS, STT) can be set dynamically via the visual Settings pane within the Web UI after booting. For deeper system overrides (like database location or custom proxy headers), you may review and edit ai-hub/app/config.yaml.

2. Launch the Stack

Initialize the Hub (Backend, Frontend, Browser Service, and SQLite Database) in one command:

docker compose up -d --build

๐Ÿ—๏ธ Deployment Architecture

Cortex Hub uses a layered deployment strategy to keep the core codebase clean while supporting specific production environments.

๐Ÿ“‚ Folder Structure

  • ai-hub/: The Core Python (FastAPI) backend.
  • frontend/: The React-based unified dashboard.
  • agent-node/: The lightweight client software for distributed nodes.
  • skills/: Source for AI capabilities (Shell, Browser, etc.).
  • deployment/: Environment-specific overrides (e.g., jerxie-prod with NFS support).
  • scripts/: Centralized automation for sync, rebuilding, and maintenance.

๐Ÿšข Production Deployment

For Jerxie AI production instances, we use the centralized remote deployer:

# Sync local changes and rebuild on the production server
REMOTE_PASS='<PASSWORD>' bash scripts/remote_deploy.sh

๐Ÿ›๏ธ Project Layout

.
โ”œโ”€โ”€ ai-hub/             # Backend API & Orchestrator
โ”œโ”€โ”€ frontend/           # Frontend Workspace (React)
โ”œโ”€โ”€ agent-node/         # Distributed Node Client (Lightweight)
โ”œโ”€โ”€ browser-service/    # Dedicated Browser Automation Service (Playwright)
โ”œโ”€โ”€ skills/             # AI Skill Definitions
โ”œโ”€โ”€ deployment/         # Env Overrides (NFS, SSL, OIDC)
โ”œโ”€โ”€ scripts/            # CI/CD & Maintenance Scripts
โ”œโ”€โ”€ cortex.db           # Local SQLite Cache
โ””โ”€โ”€ docker-compose.yml  # Generic Development Entrypoint

๐Ÿงช Testing

  • Backend: pytest ai-hub/tests/
  • Frontend Health: scripts/frontend_tester
  • Connectivity: scripts/test_ws.js

โš–๏ธ License

Distributed under the MIT License. See LICENSE for more information.