An experimental Java conversion (MVP) of the OpenClaw Personal AI Assistant.
This project implements a minimal viable version of OpenClaw in Java, focusing on:
- WebSocket Gateway (port 18789)
- Anthropic-powered Agent Runtime
- Console-based Interaction Channel
- Session Management with JSONL persistence
- Java 21+ (virtual threads required)
- Anthropic API Key (
sk-ant-...)
-
Build the project:
./gradlew build
-
Configure: Create
~/.openclaw-java/config.json:{ "gateway": { "port": 18789, "authToken": "test-token" }, "agent": { "provider": "anthropic", "apiKey": "sk-ant-...", "model": "claude-sonnet-4-20250514" } } -
Run Gateway:
java -jar build/libs/openclaw-java.jar gateway
-
Interact: The gateway will launch an interactive console prompt. Type messages to chat with the agent.
src/main/java/ai/openclaw/gateway- WebSocket serversrc/main/java/ai/openclaw/agent- Agent logic loop & LLM providersrc/main/java/ai/openclaw/channel- Console channel implementationsrc/main/java/ai/openclaw/config- Configuration loadersrc/main/java/ai/openclaw/session- Session storage