# Project Overview: Cortex Hub

**Cortex Hub** is a state-of-the-art, modular AI orchestration platform. As summarized by `agent_1` in the swarm: it is designed to enable the secure, autonomous execution of complex workflows—such as shell operations, file manipulation, and web scraping—by a coordinated swarm of AI agents working across connected nodes. It bridges the gap between Large Language Models (LLMs) and local execution via a distributed **Agent Node Mesh** and a local file-based **swarm_framework** for orchestrating isolated sub-agents in **tmux**.

Here is a high-level breakdown of the project structure and its main components:

---

## 🏛️ Project Structure

The project is organized into several key directories, reflecting its microservices-like architecture:

### Core System
- **`ai-hub/`**: The Core Backend. A Python (FastAPI) application handling task orchestration, WebSocket streaming, RAG (Retrieval-Augmented Generation) logic, and database management.
- **`frontend/`**: The User Interface. A React-based dashboard where users can manage sessions, configure nodes, and monitor the swarm in real-time.
- **`agent-node/`**: The Distributed Node Client. A lightweight client software installed on the target machines to give the AI "hands-on" execution power.
- **`browser-service/`**: A dedicated service using Playwright for high-performance browser automation and web scraping.

### Capabilities & Configuration
- **`skills/`**: Definitions of AI capabilities (e.g., Terminal Control, File Management, System Analysis).
- **`deployment/`**: Configuration overrides for different environments.
- **`scripts/`**: Helper scripts for CI/CD, setup, and maintenance.

---

## 🐝 Swarm Framework

The `swarm_framework/` directory contains the specific implementation for file-based communication and agent orchestration in tmux.
- **Purpose**: To control a swarm of agents with isolated environments via file operations.
- **Workflow**: Tasks are assigned by dropping JSON files into `comms/requests/`, and responses are read from `comms/responses/`.
