Open Source · Self-Hosted · Apache-2.0

Your AI.
Your server.
Your rules.

A minimal, self-hosted web chat that connects directly to your OpenClaw agent. No data leaves your infrastructure — except the model API call you control.

Get started in 60s View source
bash

How a message travels

Every request follows the same path. No middleman, no cloud relay, no hidden hops.

🌐
Browser
sessionId stored
in sessionStorage
client
POST /api/chat
JSON body
🦞
ochat server
Express · Node.js
port 18800
host
spawn process
--json flag
⚙️
OpenClaw
agent gateway
local process
host
HTTPS API call
encrypted
🤖
AI Provider
Anthropic · OpenAI
your API key
cloud
🌐
Browser
renders response
in chat UI
{ ok, text }
JSON
🦞
ochat server
parses stdout
extracts JSON
stdout JSON
payloads[0].text
⚙️
OpenClaw
agent response
exits cleanly
response body
encrypted
🤖
AI Provider
model completion
returned

See it in action

A real ochat session. The UI is served directly from the Express server — pure HTML, no framework.

OpenClaw Chat
sessão a3f9b2c1…
Conversa iniciada. Pode digitar.
POST /api/chat
// request
{
  "message": "What can you help with?",
  "sessionId": "a3f9b2c1-…"
}
spawn openclaw agent
$ openclaw agent \
    --session-id a3f9b2c1 \
    --message "What can you…" \
    --json
response
// response
{
  "ok": true,
  "text": "I can help with…",
  "sessionId": "a3f9b2c1-…"
}

Running in 60 seconds

Docker handles everything — openclaw, the gateway, and the chat server in a single container.

01
Clone
git clone github.com/rmfaria/ochat
No build environment needed. Just Docker.
02
Configure
Copy .env.example to .env and add your ANTHROPIC_API_KEY or OPENAI_API_KEY.
03
Launch
docker compose up -d
The container bootstraps the gateway config automatically on first run.
04
Chat
Open http://localhost:18800
Sessions persist across page reloads via sessionStorage UUID.
bash
$ git clone https://github.com/rmfaria/ochat.git && cd ochat
$ cp .env.example .env
# Edit .env — add ANTHROPIC_API_KEY=sk-ant-...
$ docker compose up -d
$ open http://localhost:18800