Remote management for Codex instances. Control your local Codex AI assistant from any web browser or mobile device.
Kowdex lets you interact with Codex running on your computer from anywhere. Start conversations, manage multiple instances, and get real-time streaming responses through a modern web interface.
bun installmkcert -install
mkcert -cert-file certs/localhost+2.pem -key-file certs/localhost+2-key.pem localhost 127.0.0.1 ::1Create a .env file in the project root:
# Server
PORT=4000
HOST=localhost
TLS_ENABLED=true
TLS_CERT=./certs/localhost+2.pem
TLS_KEY=./certs/localhost+2-key.pem
# Authentication tokens (generate your own)
AGENT_TOKEN=your-agent-token-here
CLIENT_TOKEN=your-client-token-here
# Agent
RELAY_URL=wss://localhost:4000/wsGenerate secure tokens:
openssl rand -hex 32Open three terminal windows:
Terminal 1 - Relay Server:
bun run dev:relayTerminal 2 - Web Interface:
bun run dev:webTerminal 3 - Local Agent:
bun run dev:agentNavigate to https://localhost:4001 in your browser.
- Enter your Client Token (the
CLIENT_TOKENfrom your.env) - Enter the Relay URL (
wss://localhost:4000/ws) - Click Connect
Kowdex consists of three components that work together:
┌─────────────┐ ┌─────────────┐ ┌─────────────┐
│ Web App │ ◄─────► │ Relay │ ◄─────► │ Agent │
│ (browser) │ WSS │ (server) │ WSS │ (local) │
└─────────────┘ └─────────────┘ └─────────────┘
│
▼
┌─────────────┐
│ Codex │
│ (process) │
└─────────────┘
The browser-based interface that users interact with. It connects to the relay server via WebSocket and provides:
- Instance management (create, stop, view status)
- Thread management (start, resume, archive conversations)
- Real-time chat with streaming responses
- Approval handling for Codex tool calls
The web app can run on any device with a browser - your phone, tablet, or another computer.
The central hub that bridges web clients and agents. It:
- Authenticates connections using separate tokens for agents and clients
- Routes messages between web clients and agents
- Broadcasts events (streaming text, status changes) to connected clients
- Handles multiple concurrent agent and client connections
The relay runs on a server accessible from both the agent and web clients (can be localhost for local development, or a VPS for remote access).
Runs on the machine where you want Codex to operate. It:
- Connects to the relay server and authenticates as an agent
- Spawns and manages Codex processes (one per instance)
- Translates relay commands into Codex CLI interactions
- Streams events (responses, tool calls, status) back through the relay
The agent must run on a machine with Codex installed and access to the directories you want to work with.
- User sends message → Web App sends
turn/startto Relay - Relay forwards → Agent receives command, sends to Codex process
- Codex responds → Agent emits events, Relay broadcasts to Web App
- Streaming display → Web App renders text as it arrives
All communication uses WebSocket with JSON messages. The relay acts purely as a router - it doesn't store conversations or process commands.
- Click New Instance on the main page
- Enter a name and working directory for your Codex instance
- Click Create
- Select an instance from the list
- Click New Thread to start a conversation
- Type your message and press Enter
- Watch the streaming response appear in real-time
- Stop: Click the stop button next to any running instance
- View Threads: Click an instance to see all conversation threads
- Resume: Click any previous thread to continue the conversation
Make sure you ran mkcert -install to trust the local CA. You may need to restart your browser.
- Verify
AGENT_TOKENmatches in both.envand the agent's environment - Check that the relay server is running on the expected port
- Look for connection errors in the agent terminal
- Ensure
codexis installed and available in your PATH - Try running
codex --versionto verify installation
MIT