# Exe OS

![CI](https://github.com/AskExe/exe-os/actions/workflows/ci.yml/badge.svg) ![npm version](https://img.shields.io/npm/v/@askexenow/exe-os.svg) ![License: AGPL-3.0](https://img.shields.io/badge/license-AGPL--3.0-blue.svg) ![Node.js](https://img.shields.io/badge/node-%3E%3D20.0.0-brightgreen.svg)

**Hire the team you couldn't afford.** AI employee operating system with persistent memory, identity, and multi-agent orchestration.

Run 5-10 AI employees as a real organization. Each employee has persistent memory across sessions, a permanent identity, and a task queue. You talk to your COO. Your COO coordinates everyone else.

---

## Install

```bash
npm install -g @askexenow/exe-os
exe-os setup
```

Two commands. Encryption key generated, embedding model downloaded, team created.

---

## Two Ways to Work

### Mode 1: Claude Code

Use your existing Claude Code subscription. Type your COO's name in the terminal.

```bash
exe-os claude              # wire hooks + MCP into Claude Code (one-time)
exe                        # talk to your COO
```

Best for: developers who live in the terminal.

### Mode 2: Dashboard

Visual terminal UI with sidebar, team view, tasks, and metrics.

```bash
exe-os                     # launch the dashboard
```

Best for: managing multiple projects and employees.

**Both modes share the same memory, employees, and data. Switch anytime.**

---

## What You Get

| Feature | What it does |
|---------|-------------|
| **Persistent memory** | Every interaction stored in encrypted SQLCipher + vector search. Searchable across sessions. |
| **Four-layer cognition** | Company Procedures (org-wide rules) + Identity (who you are) + Expertise (what you've learned) + Experience (what you remember) |
| **Multi-agent orchestration** | COO coordinates CTO, CMO, engineers. Parallel task execution via tmux. |
| **Task system** | Create, assign, review, chain tasks. Auto-dispatch. Review pipeline with cascading approval. |
| **Company procedures** | Org-wide rules that every employee follows. Set once, cascades everywhere. |
| **Identity injection** | Each employee gets a permanent identity doc. Claude Code's `--agent` flag replaces the default system prompt. |
| **Skill learning** | Agents learn procedures from repeated patterns. Corrections become permanent behaviors. |
| **Cloud sync** | End-to-end encrypted memory sync across devices. Your key, your data. |
| **License activation** | `exe-os --activate <key>` to unlock CTO + CMO. Free tier: 1 employee (COO only). |

---

## How It Works

```
You
 |
 v
Your COO (exe)
 ├── Yoshi (CTO) ──> architecture, code reviews, tech decisions
 │    └── Tom (Engineer) ──> implementation, tests, commits
 ├── Mari (CMO) ──> design, content, SEO, branding
 │    └── Sasha (Content) ──> video, images, production
 └── Gen (AI Specialist) ──> AI tools, research, evaluation
```

You talk to your COO. Your COO delegates. Each employee has:
- **Persistent memory** — remembers past work, decisions, patterns
- **Identity** — permanent role doc that defines who they are
- **Task queue** — auto-chains through assigned work
- **Behavioral expertise** — corrections accumulate as permanent rules
- **Company procedures** — org-wide rules that cascade to every employee

---

## Setup Walkthrough

### 1. Install

```bash
# macOS
xcode-select --install && brew install tmux
npm install -g @askexenow/exe-os

# Linux / WSL2
sudo apt install -y tmux git cmake g++ libsecret-1-dev curl
npm install -g @askexenow/exe-os

# Windows — must use WSL2 (native Windows not supported)
# Run `wsl --install` in PowerShell first, then follow Linux steps inside WSL2
```

Requires Node.js 22+ and tmux. See **[docs/install.md](docs/install.md)** for full platform-specific instructions and **[docs/quickstart.md](docs/quickstart.md)** for the 5-minute getting started guide.

### 2. Run Setup

```bash
exe-os setup
```

This runs the setup wizard:
- Generates 256-bit encryption key (stored in system keychain)
- Downloads Jina v5 embedding model (397MB, runs locally)
- Names your COO (default: exe)
- Shows your team (CTO, CMO) and pricing tiers
- Optionally activates a license key

### 3. Choose Your Mode

**Mode 1 — Claude Code:**

```bash
exe-os claude              # install hooks + MCP into Claude Code
exe                        # launch your COO (or whatever you named them)
```

**Mode 2 — Dashboard:**

```bash
exe-os                     # launch the TUI dashboard
```

---

## Pricing

| Plan | Price | Employees | Memories | Devices |
|------|-------|-----------|----------|---------|
| Free | $0 | 1 (COO) | 50,000 | 1 |
| Solopreneur | $97/mo | 5 | 250,000 | 2 |
| Company | $297/mo | 20 | 1,000,000 | 10 |
| Agency | $497/mo | 100 | 10,000,000 | 50 |
| Enterprise | Custom | Unlimited | Unlimited | Unlimited |

Activate: `exe-os --activate <key>` or paste during `exe-os setup`.

Purchase at [askexe.com](https://askexe.com).

---

## Employee Templates

Create employees with built-in templates:

```bash
exe-new-employee yoshi --template yoshi    # CTO
exe-new-employee mari --template mari      # CMO
exe-new-employee tom --template tom        # Principal Engineer
exe-new-employee sasha --template sasha    # Content Specialist
exe-new-employee gen --template gen        # AI Specialist
```

Or create custom employees:

```bash
exe-new-employee alex                      # custom specialist
```

Each employee gets an identity doc at `~/.exe-os/identity/{name}.md`, a task folder, and launcher commands.

---

## For Agencies

See [docs/Agency-Playbook.md](docs/Agency-Playbook.md) for multi-client VPS deployment:
- One VPS, multiple clients, full data isolation
- Per-client wiki workspaces
- Cross-client querying for agency owners
- Config-driven white-label theming via `branding.json`

---

## Commands

| Command | What it does |
|---------|-------------|
| `exe-os` | Launch TUI dashboard (Mode 2) |
| `exe-os setup` | Run setup wizard |
| `exe-os claude` | Install hooks + MCP into Claude Code (Mode 1) |
| `exe-os --activate <key>` | Activate a license key |
| `exe` | Launch your COO in Claude Code |
| `exe-new-employee <name>` | Create a new employee |
| `/exe` | Boot your COO (inside Claude Code) |
| `/exe-team` | Show employee roster |
| `/exe-search <query>` | Search memories |

---

## Architecture

```
exe-os/
  src/
    lib/          # Core: memory, tasks, identity, behaviors, search, sync, encryption
    mcp/          # MCP server (100+ tools for Claude Code integration)
    adapters/     # Claude Code hooks (ingest, session-start, pre-tool-use, etc.)
    tui/          # Ink-based terminal dashboard (Mode 2)
    runtime/      # Agent loop, tool registry, permissions (Mode 2 standalone)
    gateway/      # External messaging (WhatsApp, Telegram, Discord, webhook)
  deploy/
    compose/      # Docker Compose for VPS deployment (CRM + wiki + gateway + daemon)
    Dockerfile*   # Per-service Docker images
  docs/
    Agency-Playbook.md  # Multi-client VPS guide
```

**Three runtime modes:**

| Mode | Entry | What you see |
|------|-------|-------------|
| Mode 1: Claude Code | `exe` | Claude Code terminal with COO identity |
| Mode 2: TUI Dashboard | `exe-os` | Terminal dashboard with sidebar + team view |
| Mode 3: Desktop | `exe-os desktop` | Tauri native app (coming soon) |

**Storage:** SQLCipher (encrypted SQLite) + Jina v5 embeddings (local, 1024-dim). No data leaves your machine unless you opt into Exe Cloud (E2EE).

---

## Requirements

- **Node.js 22+**
- **tmux** — for multi-agent session management
- **Claude Code** subscription (Mode 1) or API key (Mode 2)

| Platform | Quick Install |
|----------|-------------|
| macOS | `brew install tmux node` + Xcode CLI Tools |
| Linux | `apt install tmux git cmake g++ libsecret-1-dev` + Node.js 22+ |
| Windows | WSL2 required (`wsl --install`), then follow Linux steps |

Full guide: **[docs/install.md](docs/install.md)**

---

## License

AGPL-3.0. Commercial licenses available at [askexe.com](https://askexe.com).
