Web chat interface for OpenClaw — a lightweight Express server that manages OpenClaw agent sessions and returns responses to the browser.
ochat provides a minimal, self-hosted chat UI to interact with an OpenClaw agent from any browser.
- Single-file TypeScript server (
src/index.ts, ~180 lines) - Per-session OpenClaw subprocess — full isolation between conversations
- Dark space-themed UI, no external dependencies
- Configurable base path for reverse-proxy setups (e.g.
/ochat/)
The easiest way to run ochat. No Node.js or openclaw required on the host.
git clone https://github.com/rmfaria/ochat.git
cd ochat
cp .env.example .env
# Edit .env — set ANTHROPIC_API_KEY or OPENAI_API_KEY
docker compose up -dOpen: http://localhost:18800
On first startup, ochat bootstraps the OpenClaw gateway config automatically from your API key.
| Variable | Default | Description |
|---|---|---|
ANTHROPIC_API_KEY |
— | Anthropic API key (at least one provider required) |
OPENAI_API_KEY |
— | OpenAI API key |
OCHAT_PORT |
18800 |
Host port |
BASE_PATH |
`` | URL prefix for reverse-proxy (e.g. /ochat) |
See INSTALL.md for the full guide including production deployment, Swarm/Traefik setup, and troubleshooting.
Requires Node.js 22+ and openclaw installed globally.
npm install -g openclaw
npm install
npm run build # compiles src/index.ts → dist/index.js
npm start # serves on port 18800npm run dev| Variable | Default | Description |
|---|---|---|
PORT |
18800 |
HTTP port |
BASE_PATH |
`` | URL prefix for reverse-proxy setups |
OPENCLAW_BIN |
openclaw |
OpenClaw invocation command (override for custom paths) |
OPENCLAW_BIN="node /usr/lib/node_modules/openclaw/openclaw.mjs" npm startexport ORBIT_HOST=your.domain.com
export OCHAT_BASICAUTH='admin:$$apr1$$...' # htpasswd -nb admin yourpassword
docker stack deploy -c docker-stack.yml ochatServes at https://<ORBIT_HOST>/ochat/ with HTTP Basic Auth via Traefik.
| Method | Path | Description |
|---|---|---|
GET |
/ |
Chat UI (HTML) |
GET |
/health |
Health check |
POST |
/api/chat |
Send a message, get agent response |
Request:
{ "message": "your prompt here", "sessionId": "optional-uuid" }Response:
{ "ok": true, "text": "agent response", "sessionId": "uuid" }Sessions are identified by sessionId. Reuse the same ID to continue a conversation.
- INSTALL.md — full installation guide
- orbit-core — telemetry platform ochat was originally bundled with
- OpenClaw — the AI agent runtime
Apache-2.0