The local-first runtime for digital workers that hold roles, follow rules, and evolve under governance.
| English | 中文 |
| Quick Start | API | Configuration | Deployment | Architecture |
genworker is a filesystem-first runtime for digital employee and digital worker scenarios.
It does not wrap a generic agent with a prompt and keep it running indefinitely. Instead, it treats the role as the primary object in the system:
By default, genworker keeps the core capabilities for multiple workers, skills, tools, MCP, sessions, and autonomous runtime execution while minimizing infrastructure requirements:
workspace/ and configs/Role-first, not agent-first: The primary entity is a role or worker, not an agent instance.Organization-aware: Multiple AI workers are not just multi-agent messaging; they have responsibility boundaries, collaboration relationships, and ownership-based routing.Governable by design: Permissions, auditability, trust levels, and human-in-the-loop controls are runtime capabilities, not prompt-only conventions.Learning with approval: Learning follows a proposal, review, and activation flow instead of being automatically persisted and applied.Goal-driven autonomy: Proactive behavior is driven by structured goals and state deviation, not only by cron schedules.One runtime, many triggers: Conversations, tasks, events, and inspections share the same worker execution pipeline.| Dimension | Common personal assistants / generic agents | genworker |
|---|---|---|
| Primary entity | One user’s agent or workspace | A role or worker inside an organization |
| Role definition | Prompt plus tool configuration | A system-registered role object |
| Memory boundary | A global memory pool around “me” | Layered isolation between role experience and tenant data |
| Learning model | Automatically persisted and often automatically activated | Proposal, review, activation, and decay lifecycle |
| Multi-role collaboration | Multi-agent messaging or routing | Responsibility boundaries, collaboration relationships, and ownership routing |
| Proactivity | Cron or scheduled triggers | Goal-driven and state-deviation-driven triggers |
| Work modes | Conversation, task, event, and inspection flows are often implemented separately | Conversations, tasks, events, and inspections share one execution pipeline |
If your goal is a personal AI companion, projects such as Hermes or OpenClaw may be a better fit. If your goal is a governable, traceable digital worker that serves an organization and occupies a role, genworker is the better fit.
POST /api/v1/chat/streamPOST /api/v1/worker/task/streamGET /healthGET /readinessGET /api/v1/debug/runtimeThe default operating model is intentionally direct:
configs/ for layered configuration.workspace/ for tenants, workers, skills, and personas.python start.py./health, /readiness, and /api/v1/debug/runtime.This means you can validate the system on a regular development machine first, then decide whether to introduce a reverse proxy, external storage, or a more complex deployment topology.
python -m venv venv
source venv/bin/activate
pip install -r requirements.txt
Minimal runnable configuration:
cp configs/config.example.env configs/config_local.env
If you already prefer maintaining only configs/config_local.env, edit it directly. The runtime reads layered configuration under configs/ first. The root .env.example mainly serves containers, CI, or external launch wrappers; it is not the primary configuration entry point for start.py.
python start.py
The default mode is lightweight and local:
RUNTIME_PROFILE=localREDIS_ENABLED=falseMYSQL_ENABLED=falseOPENVIKING_ENABLED=falseIM_CHANNEL_ENABLED=falsecurl -s http://127.0.0.1:8000/health
curl -s http://127.0.0.1:8000/readiness
curl -s http://127.0.0.1:8000/api/v1/debug/runtime
If /readiness returns success and /api/v1/debug/runtime shows the default worker and current profile, the main runtime path is up.
Chat stream example:
curl -s -N -X POST "http://127.0.0.1:8000/api/v1/chat/stream" \
-H "Content-Type: application/json" \
-d '{
"message": "Hello, help me summarize what I should prioritize today",
"thread_id": "chat-001",
"tenant_id": "demo",
"worker_id": "analyst-01"
}'
Task stream example:
curl -s -N -X POST "http://127.0.0.1:8000/api/v1/worker/task/stream" \
-H "Content-Type: application/json" \
-d '{
"task": "Check my inbox and organize my todos",
"tenant_id": "demo",
"worker_id": "analyst-01"
}'
See docs/API.md for more API details.
See docs/CONFIGURATION.md for configuration details.
Key rules:
configs/ directory and do not depend on the current shell directory.LOG_DIR is a relative path, it is resolved against the project root.workspace root is fixed to <project>/workspace.start.py switches back to the project root before startup to avoid path drift when launched from another directory.Reference templates:
.env.exampleconfigs/config.example.envconfigs/profiles/local.envconfigs/profiles/local_memory.envconfigs/profiles/advanced.envconfigs/profiles/enterprise.envIt is useful to think of genworker as four layers:
workspace/The default local mode only requires the first three layers.
| Profile | Purpose | Redis | MySQL | OpenViking | IM |
|---|---|---|---|---|---|
local |
Minimal local development and debugging | off | off | off | off |
local_memory |
Local filesystem plus semantic memory experiments | off | off | on | off |
advanced |
Enhanced runtime | on | off | off | off |
enterprise |
Full enterprise template | on | on | off | on |
These profiles are templates; they do not lock in your deployment model. Process environment variables still have the highest priority.
.
├── configs/ # Layered configuration and profile templates
├── docs/ # Architecture and configuration documentation
├── frontend/ # Frontend static assets
├── src/ # Runtime implementation
├── tests/ # Unit and integration tests
├── workspace/ # Default runtime workspace
├── workspace.example/ # Example workspace template
└── start.py # Local startup entry point
python start.py.API_BEARER_TOKEN or API_KEY if you need to protect API endpoints./health only checks whether the process is alive; /readiness checks whether the default main runtime path can serve traffic.workspace.example/ is useful for initializing a new worker directory structure.tests/ includes both unit and integration tests and is a good regression baseline for downstream development.See docs/ARCHITECTURE.md for architecture details.