Back to home
Documentation

Getting Started

Aegis is a real-time context bridge for AI coding agents. It prevents Cursor, Claude Code, and Gemini CLI from drifting out of sync when working on the same codebase simultaneously.

Installation

Install the Aegis CLI globally via npm:

npm install -g @aegis/cli

Verify the install:

aegis --version

Aegis requires Node.js 18+ and an active subscription (or free trial tokens). Sign up at aegissolutions.co.uk to get your API key.

Start the Relay

The relay is a local WebSocket server that all your AI agents connect to. Start it once per project:

cd your-project
aegis relay

The relay starts on ws://localhost:7734 by default.

To watch for file changes and broadcast context diffs automatically:

aegis watch

Both commands run together in development. Use two terminal tabs or a process manager like concurrently.

CLI Commands

aegis relay

Start the local WebSocket relay server on port 7734. All connected agents subscribe to context broadcasts.

aegis watch

Watch the current directory for agent-authored file changes and broadcast diffs to all relay subscribers.

aegis verify

Token Sentry check. Calls POST /api/verify with your AEGIS_API_KEY. Exits with a styled "TRIAL EXPIRED" error box if your subscription is lapsed.

aegis upgrade

Opens your billing portal in the browser and displays your current token balance in the terminal.

aegis status

Show all currently connected agents, relay uptime, and token usage for the current session.

How It Works

When two AI agents edit the same codebase simultaneously they develop conflicting internal state — each believes their version of a file is authoritative. This causes hallucinated conflicts, duplicate work, and reverted changes.

Aegis inserts itself between agents at three layers:

  1. File Watcher — detects any write to the project directory and captures a diff.
  2. Relay Server — broadcasts that diff over WebSocket to every connected agent within milliseconds.
  3. Agent Bridge — each agent's Aegis plugin applies the incoming diff to its local context window, keeping all agents in sync.

The Desktop HUD visualises which agents are active, what files they are editing, and how many tokens the session has consumed.

Token Sentry

Every Aegis operation costs a small number of verification tokens. New accounts receive 5,000 free tokens to explore the product.

Token costs

Vibe Check50 tokens
Context Sync5 tokens
Agent Relay event1 token

When tokens are exhausted, aegis verify will block the operation and display an upgrade prompt. Run aegis upgrade to open billing.

Paid plan tokens refresh automatically on each billing cycle — you never lose unused tokens from the previous month.

FAQ

Does Aegis send my code to a server?

No. The relay runs entirely on localhost. Only token verification calls (aegis verify) reach our servers — these contain only your API key and action type, never your code.

Which AI agents are supported?

Cursor, Claude Code, and Gemini CLI are fully supported. Any agent that can read from a WebSocket or a local file can be connected manually.

Can I use Aegis on multiple projects?

Core plan is limited to one active project. Pro and above support unlimited projects with separate relay instances.

What happens when my tokens run out mid-session?

Active relay connections remain open. Only new operations that trigger a token check (vibe checks, context syncs) are blocked until you upgrade or wait for the next billing cycle.

Is there an Enterprise self-hosted option?

Yes — Enterprise plan customers can request an on-premises relay build. Contact us at enterprise@aegissolutions.co.uk.

Ready to sync your agents?

Start free — no credit card required.

Get started free