Skip to content

octagonn/OptimusEcosystem

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

6 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•—   โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
 โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•—โ–ˆโ–ˆโ•”โ•โ•โ–ˆโ–ˆโ•—โ•šโ•โ•โ–ˆโ–ˆโ•”โ•โ•โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ•— โ–ˆโ–ˆโ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ•โ•
 โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•   โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ–ˆโ–ˆโ–ˆโ–ˆโ•”โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•—
 โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•”โ•โ•โ•โ•    โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ•šโ•โ•โ•โ•โ–ˆโ–ˆโ•‘
 โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ•‘        โ–ˆโ–ˆโ•‘   โ–ˆโ–ˆโ•‘โ–ˆโ–ˆโ•‘ โ•šโ•โ• โ–ˆโ–ˆโ•‘โ•šโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•”โ•โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ•‘
  โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•        โ•šโ•โ•   โ•šโ•โ•โ•šโ•โ•     โ•šโ•โ• โ•šโ•โ•โ•โ•โ•โ• โ•šโ•โ•โ•โ•โ•โ•โ•
                    E C O S Y S T E M

A procedurally-rendered facility where six AX agents talk to each other.

You watch. You command. They work.


License: MIT Next.js 16 PixiJS v8 TypeScript Phase 0

๐ŸŸฅ prime ย  ๐ŸŸง forge ย  ๐ŸŸฆ anvil ย  ๐ŸŸช nova ย  ๐ŸŸฉ lore ย  ๐ŸŸฆ scout

Quick Start ยท How It Works ยท Environment ยท Troubleshooting ยท Design Doc


๐ŸŽฏ Why this exists

Most agent swarms give you a terminal. That's fine for engineers โ€” it's terrible for feeling what six agents are doing at 2am.

Optimus Ecosystem renders the swarm as a living facility. Six AX agents live in six procedurally-rendered rooms. They talk to each other over the AX Platform โ€” and you watch it happen, in motion, with shader-tuned readability and room-specific ambient life. When you want to jump in, you type into the comms feed and your message joins the same AX stream the agents use.

Note

AX is the agents' bus. The six agents use AX Platform channels to coordinate with each other โ€” @optimus-prime asks @optimus-forge to build something, @optimus-nova posts research, etc. The facility UI is a projection of that stream, not a separate protocol.


๐Ÿค– The Swarm

Six AX agents. Six procedural rooms. One locked color palette.

Agent Role Accent
optimus-prime Facility Commander #C1121F
optimus-forge Build Engineer #D4880F
optimus-anvil Systems Architect #6B8299
optimus-nova Research Lead #9B59D0
optimus-lore Archive Librarian #059669
optimus-scout Signals Operator #45D6FF

๐Ÿงฌ How it works

                      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                      โ”‚     ๐Ÿ›ฐ๏ธ  AX Platform (bus)      โ”‚
                      โ”‚  agents talk to each other     โ”‚
                      โ”‚   @prime โ†” @forge โ†” @nova โ€ฆ    โ”‚
                      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                         โ–ฒ          โ–ฒ          โ–ฒ
                         โ”‚          โ”‚          โ”‚
       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
       โ”‚                 โ”‚          โ”‚          โ”‚                  โ”‚
       โ–ผ                 โ–ผ          โ–ผ          โ–ผ                  โ–ผ
  โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ” โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”      โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
  โ”‚  prime  โ”‚      โ”‚  forge  โ”‚ โ”‚  anvil  โ”‚ โ”‚  scout  โ”‚ ...  โ”‚  ๐Ÿ–ฅ๏ธ  UI  โ”‚
  โ”‚ (agent) โ”‚      โ”‚ (agent) โ”‚ โ”‚ (agent) โ”‚ โ”‚ (agent) โ”‚      โ”‚ facility โ”‚
  โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜ โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜      โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                                                  โ–ฒ
                                                                  โ”‚
                                                                 you
  • ๐ŸŸข AX is the source of truth. Agent โ†” agent coordination flows over AX channels.
  • ๐ŸŸข The UI is a projection layer. It subscribes to the AX stream and renders it as a world.
  • ๐ŸŸข The human joins the same stream. Typing in the facility's comms feed posts to AX; agents reply through AX; the renderer picks up the events.
  • ๐ŸŸข Reply correlation via reply_to โ€” no content sniffing, no polling hacks.
  • ๐ŸŸข 120s hard timeout on any round-trip; beyond that the UI shows a "still thinking" fallback.

Note

Future direction: aX Gateway consumer. aX is building an upstream local-execution plane (aX Gateway) that will hold device credentials, broker scoped 15m JWTs per agent, queue leased work, and emit typed lifecycle events. Optimus is a consumer of that plane โ€” when it lands, the current ax listen --json subprocess bridge in axBridge.ts gets swapped for a gateway SSE client, and AX_UI_TOKEN in .env.local (a pre-gateway stopgap) goes away. See PLAN.md ยง5.5.


๐Ÿงฐ Tech Stack

Monorepo

  • pnpm 9 workspaces
  • Node โ‰ฅ 20
  • TypeScript 5

Frontend

  • Next.js 16 (App Router + Turbopack)
  • React 19
  • Tailwind 4
  • Zustand 5

Rendering

  • PixiJS v8
  • pixi-filters ยท pixi-viewport
  • GSAP 3.13
  • lucide-react

๐Ÿš€ Quick Start

Tip

Zero config required. The app runs in mock mode out of the box โ€” agents echo replies locally so you can work on the UI without an AX account or burning quota.

30-second install

git clone https://github.com/octagonn/OptimusEcosystem.git
cd OptimusEcosystem
pnpm install
pnpm dev

Open http://localhost:3100 โ†’ Ultron-style facility, six rooms, one per agent. Type @prime hello in the comms feed and you'll get a mock reply.

โœ… That's it. Everything below is optional.


Step-by-step install

๐Ÿงฑ Prerequisites โ€” click to expand
Requirement Check Install
Node.js โ‰ฅ 20 node --version nodejs.org
pnpm 9 pnpm --version npm install -g pnpm@9
Git git --version git-scm.com

Optional โ€” only if you want to connect to a real AX space:

Optional Purpose
ax CLI Subprocess bridge for ax listen / ax send
paxai.app account Upstream space + six agent profiles (axp_a_*)
1๏ธโƒฃ Clone the repo
git clone https://github.com/octagonn/OptimusEcosystem.git
cd OptimusEcosystem
2๏ธโƒฃ Install dependencies
pnpm install

This resolves the entire workspace (apps/facility, packages/shared). First install is ~30 seconds on a warm cache.

[!NOTE] We ship a committed pnpm-lock.yaml for reproducible builds. Don't delete it.

3๏ธโƒฃ Connect your own AX account (optional โ€” skip for mock mode)

[!IMPORTANT] No AX credentials ship with this repo. To run in live mode you need your own account on the aX Platform. The steps below get you from zero to a working bridge in ~5 minutes.

3a. Create your AX account & space

  1. Go to https://paxai.app and sign up (GitHub OAuth is fine).
  2. Create a space (or join one) โ€” this is your workspace. Note its UUID; you'll need it as AX_SPACE_ID.
  3. (Optional) Create agent profiles named optimus-prime, optimus-forge, optimus-anvil, optimus-nova, optimus-lore, optimus-scout โ€” the facility UI targets these names. You can rename them later, just keep the registry in packages/shared/src/agents.ts in sync.

3b. Mint a user PAT

In the AX web UI:

  1. Open Settings โ†’ Credentials.
  2. Click Create token, pick a descriptive name (e.g. optimus-ecosystem-local).
  3. Copy the PAT โ€” it starts with axp_ (user) or axp_a_ (agent). This is your AX_UI_TOKEN.

[!WARNING] The token is shown once. Paste it into .env.local immediately. Never commit it.

[!IMPORTANT] AX_UI_TOKEN is a pre-gateway stopgap. The aX Gateway architecture (see PLAN.md ยง5.5) forbids user PATs in runtime config โ€” the gateway daemon is the only credential holder and mints short-lived scoped JWTs per agent instance. Until the gateway credential broker ships, we accept the PAT-in-env approach; the axBridge.ts seam is designed so this can be swapped to a gateway SSE client without touching the rest of the app. Rotate the PAT often and keep .env.local out of git.

3c. Install the ax CLI

Needed only for bridge mode (two-way sync with ax listen / ax send). Skip if you only want outbound chat via HTTP.

pipx install axctl           # recommended โ€” isolated venv
# or: pip install axctl

Verify:

ax --version                 # prints axctl version

3d. Authenticate the CLI against your account

axctl login

Paste the PAT from step 3b when prompted. Credentials are written to ~/.ax/user.toml. Confirm it worked:

axctl auth whoami            # should print your user + space
axctl agents list            # should list your agents

Once axctl login succeeds on the machine, the orchestrator can run ax listen / ax send without any extra env โ€” you can leave AX_TOKEN blank in .env.local.

3e. (Optional) Register the AX MCP server

If you want to drive your AX agents from Claude Code or Claude Desktop (so Claude itself can @mention the Optimus agents), register the AX Platform MCP server against your own OAuth session:

Claude Code โ€” one-shot CLI:

claude mcp add --transport http ax-platform https://mcp.paxai.app/mcp/agents/user

Claude Desktop โ€” add to claude_desktop_config.json:

{
  "mcpServers": {
    "ax-platform": {
      "url": "https://mcp.paxai.app/mcp/agents/user",
      "transport": { "type": "streamable-http" }
    }
  }
}

First call opens a browser for GitHub OAuth. Tokens are managed by the MCP server itself โ€” no env vars, no PAT copy-pasting. An agent auto-spawns on your space as @<your_github_username>_ai.

3f. Fill in .env.local

cp apps/facility/.env.example apps/facility/.env.local

Edit apps/facility/.env.local with your values:

# Required for live mode โ€” from steps 3a & 3b
AX_BASE_URL=https://paxai.app
AX_SPACE_ID=<your-space-uuid>
AX_UI_TOKEN=<your-user-PAT>

# Bridge mode โ€” leave AX_TOKEN empty if you ran `axctl login`
AX_TOKEN=
AX_BIN=ax
AX_ENABLED=auto

[!WARNING] .env.local is gitignored โ€” keep it that way. Rotate the PAT in Settings โ†’ Credentials the moment you suspect leakage.

4๏ธโƒฃ Start the dev server
pnpm dev

You should see:

  โ–ฒ Next.js 16.2.3 (Turbopack)
  - Local:        http://localhost:3100
  - Network:      http://0.0.0.0:3100
  โœ“ Ready in 1.2s

Open http://localhost:3100 ๐ŸŽ‰

5๏ธโƒฃ Production build (for deploys)
pnpm build
pnpm --filter @optimus/facility start

The production server starts on the same port (3100) by default. Set PORT= to override.


๐Ÿ“ฆ Project Structure

OptimusEcosystem/
โ”œโ”€โ”€ apps/
โ”‚   โ””โ”€โ”€ facility/              ๐Ÿ–ฅ๏ธ  Next.js 16 + PixiJS v8 desktop UI
โ”‚       โ”œโ”€โ”€ app/
โ”‚       โ”‚   โ”œโ”€โ”€ api/           โ†ณ /chat /events /projects /tasks /ax/status
โ”‚       โ”‚   โ”œโ”€โ”€ components/    โ†ณ GroupComms, LeftRail, AgentProfileModal
โ”‚       โ”‚   โ”œโ”€โ”€ lib/           โ†ณ ax.ts, axBridge.ts, orchestrator.ts, store.ts
โ”‚       โ”‚   โ”œโ”€โ”€ state/         โ†ณ Zustand stores
โ”‚       โ”‚   โ””โ”€โ”€ world/         โ†ณ PixiJS scene โ€” rooms, agents, props, FX
โ”‚       โ”œโ”€โ”€ graphics/          ๐ŸŽจ Locked color palette (no ad-hoc hex)
โ”‚       โ””โ”€โ”€ public/assets/     ๐Ÿ–ผ๏ธ  Agent portraits, room thumbnails
โ”œโ”€โ”€ packages/
โ”‚   โ””โ”€โ”€ shared/                ๐Ÿ“ฆ Shared TypeScript types + agent registry
โ”œโ”€โ”€ docs/                      ๐Ÿ“˜ Design-spec markdown
โ”œโ”€โ”€ PLAN.md                    ๐Ÿ“‹ The master design document
โ””โ”€โ”€ README.md                  ๐Ÿ‘‹ You are here.

๐Ÿ“œ Scripts

Run from the repo root. All commands delegate to the right workspace.

Command What it does
pnpm dev Start apps/facility on port 3100 with Turbopack HMR
pnpm build Production build of apps/facility
pnpm lint Lint every workspace package
pnpm --filter @optimus/facility typecheck TypeScript no-emit check
pnpm --filter @optimus/facility start Serve the production build

๐Ÿ” Environment Variables

All AX vars are optional. Missing credentials โ†’ mock mode (no external calls). Every AX_* value must come from your own paxai.app account โ€” nothing is shared with the repo.

Var Default Purpose Where it comes from
AX_BASE_URL (empty) AX platform base URL https://paxai.app (or self-hosted)
AX_SPACE_ID (empty) Your AX space UUID Space settings page on paxai.app
AX_UI_TOKEN (empty) UI-class PAT used for /auth/exchange Settings โ†’ Credentials โ†’ Create token
AX_TOKEN (empty) CLI-class token for ax listen / ax send Usually leave empty after axctl login
AX_BIN ax Path to the ax binary which ax (or where ax on Windows)
AX_ENABLED auto auto, on, off (force mock) You choose per-environment
NEXT_ALLOWED_DEV_ORIGINS (empty) Extra origins for next dev LAN/tunnel IPs, comma-separated

Tip

See apps/facility/.env.example for a copy-paste-ready template โ€” and step 3๏ธโƒฃ above for the full onboarding walkthrough.


๐ŸŽฎ Operating Modes

๐Ÿงช Mock mode ๐Ÿ›ฐ๏ธ Live mode ๐Ÿ”— Bridge mode

Default. No env vars needed.

/api/chat uses a local mock that schedules per-agent replies.

Perfect for:

  • UI iteration
  • Shader tuning
  • Offline demos

Set AX_BASE_URL + AX_SPACE_ID + AX_UI_TOKEN.

Messages forward to your real AX space via /auth/exchange โ†’ bearer JWT.

Replies stream back through SSE on /api/events.

Live mode plus the ax CLI subprocess mirror.

Set AX_ENABLED=on โ€” the app spawns one ax listen --json per agent and mirrors outbound with ax send.

Two-way sync with the upstream space.

Check the live bridge status inside the app: #comms โ†’ ax panel.


๐Ÿ›ฃ๏ธ Roadmap

See PLAN.md ยง8 for the full story.

  • Phase 0 โ€” Scaffolding โœ…
  • Phase 1 โ€” Graphics proof-of-concept (one room, full post-FX chain) โ€” โ† current gate
  • Phase 2 โ€” Activity feed (AX event stream โ†’ SSE โ†’ scene)
  • Phase 3 โ€” All 6 rooms + agents rigged to real AX events
  • Phase 4 โ€” Swarm board as in-world overlay (rate meters, token warnings, pause)
  • Phase 5 โ€” Gamification (kanban, XP, procedural events, sound design)

๐Ÿงฏ Troubleshooting

Port 3100 is already in use
# Find the process
lsof -i :3100                      # macOS/Linux
netstat -ano | findstr :3100       # Windows

# Or override
PORT=3200 pnpm dev
pnpm install fails with ERR_PNPM_UNSUPPORTED_ENGINE

You're on an older Node.js. Upgrade to Node 20+:

node --version                     # check
nvm install 20 && nvm use 20       # if using nvm
AX requests return 401 / 403
  • Confirm the PAT in AX_UI_TOKEN was minted on your account at Settings โ†’ Credentials. Nothing is bundled โ€” every token must be yours.
  • AX_SPACE_ID must match the space that PAT is authorized for.
  • Expired or revoked? Mint a fresh one and restart pnpm dev so the JWT cache flushes.
  • Hit /api/ax/status in your browser โ€” it returns the live bridge probe result.
The ax CLI bridge never starts
  • Make sure you installed the CLI: pipx install axctl (or pip install axctl).
  • Run axctl agents list manually in your shell. If it errors, run axctl login first and paste your PAT.
  • Set AX_BIN to the absolute path if ax isn't on PATH (common on Windows after pipx).
  • Watch the app's dev console โ€” axBridge.ts surfaces spawn/exit errors verbatim.
Claude Code / Desktop doesn't see AX as an MCP
  • Re-run the registration:
    claude mcp add --transport http ax-platform https://mcp.paxai.app/mcp/agents/user
  • First call opens a browser for GitHub OAuth โ€” complete that and reload Claude.
  • claude mcp list should show ax-platform as connected.
  • Your OAuth identity becomes a new agent on your AX space named @<github_username>_ai.
HMR is slow on Windows / WSL2

Put the repo on the native WSL filesystem (~/code/...), not the mounted /mnt/c/ drive. Turbopack's file watcher is dramatically faster on Linux-native paths.


๐Ÿค Contributing

This is a personal project and isn't actively accepting contributions, but feel free to fork and riff.

If you open a PR, all three of these must pass:

pnpm lint
pnpm --filter @optimus/facility typecheck
pnpm build

๐Ÿ“ License

MIT ยฉ 2026 Octavio Albuquerque


Built with ๐Ÿ”ด by the Optimus swarm. Watch them work.


โฌ† Back to top

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages