UCLAW is a web-first multi-agent collaboration runtime focused on long-form conversation, role-based continuity, attachment-aware workflows, and deployment-ready self-hosting.
This repository is an independent public snapshot of the current 46v1 line. It keeps the main Web runtime, role system, memory chain, scheduler, IM gateways, and deployment tooling in one repo.
- Runtime form:
Node.js + Express + WebSocket + React + Vite - Product focus: long-running collaboration sessions instead of short, disposable chat
- Identity anchor:
agentRoleKey - Model policy: model/provider is replaceable runtime config, not identity
- Built-in role baseline:
organizer / writer / designer / analyst
- Multi-role cowork sessions with persistent session storage
- Role-scoped memory, broadcast baton, and history retrieval
- Attachment parsing and role attachment home routing
- WebSocket streaming conversation runtime
- Scheduler and daily memory extraction pipeline
- Feishu / IM gateway integration hooks
- Self-hostable deployment path for Linux and common Node platforms
Included:
- Web runtime
- Backend API and WebSocket server
- Cowork session engine
- Role runtime and role home helpers
- Scheduler / memory pipeline
- Deployment scripts and templates
- Skills and runtime support files required by the current line
Intentionally excluded from production runtime assumptions:
- Local transient runtime data under
.uclaw - Built output under
server/distandserver/public node_modules
- Node.js
>=20 <25 - npm
>=10
Recommended local start:
npm ci
npm run dev:webDefault local ports:
- API:
http://127.0.0.1:3001 - Web:
http://127.0.0.1:5176
npm ci
npm run buildProduction start:
npm startCurrent production defaults already include:
--host 0.0.0.0--no-open
Supported full-runtime targets:
- Linux host / VM / cloud server with
systemd - Render Web Service
- Railway
- Zeabur Node service
Split deployment target:
- Static frontend shell on Vercel / Netlify / Cloudflare Pages
- Backend runtime deployed separately
Not supported as a direct full-runtime target:
- Vercel full-stack runtime for this repository in its current form
Reason:
- The runtime depends on custom
Express + WebSocket + long-lived server state
To avoid manually retyping env files, use the preset generator:
npm run deploy:init -- --target linux --public-origin https://chat.example.com --api-base-url https://api.openai.com/v1 --api-key sk-demo --model gpt-5.4Static frontend split example:
npm run deploy:init -- --target vercel-static --backend-origin https://api.example.comGenerated output goes to:
deploy/generated/<target>
Supported preset targets:
linuxrenderrailwayzeaburfrontend-staticvercel-static
Required:
NODE_ENV=productionCORS_ORIGIN=<public origin>UCLAW_API_BASE_URLUCLAW_API_KEYUCLAW_DEFAULT_MODEL
Recommended:
UCLAW_DATA_PATH=.uclawPORT=3001or platform-injected port
Important constraint:
UCLAW_DATA_PATHmust stay inside the project root, otherwise runtime safety logic will ignore it and fall back to the default local path
- Frontend static assets are served by the same Node runtime in standard production mode
- Linux unattended deployment should not rely on “fill settings later in UI” as the production baseline
- The project prefers deployment-time configuration over hand-filling first-run state
- Static frontend split mode should prefer
VITE_BACKEND_ORIGIN; only override API/WS separately when paths are non-standard
npm run dev:web: local integrated development runtimenpm run build: production buildnpm run build:web: frontend-only production buildnpm run start:local: local production smoke runnpm run start:frontend-gateway: local-style frontend gateway on5176npm run deploy:check: deployment preflightnpm run deploy:init: deployment preset generatornpm run package:delivery:linux: standard delivery bundle export
MIT