genworker

CI Python Mode Transport

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:

Core Characteristics

What You Can Do With It

How It Is Different

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

Best Fit

Not For

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.

Documentation

What You Get

Default Operating Model

The default operating model is intentionally direct:

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.

Three-Minute Quick Start

1. Install

python -m venv venv
source venv/bin/activate
pip install -r requirements.txt

2. Prepare Config

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.

3. Start

python start.py

The default mode is lightweight and local:

4. Verify

curl -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.

First Requests

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.

Configuration

See docs/CONFIGURATION.md for configuration details.

Key rules:

Reference templates:

Core Runtime Model

It is useful to think of genworker as four layers:

  1. Entry Layer: HTTP / SSE / IM / Event / Scheduler
  2. Runtime Layer: WorkerRouter, Session, Task, Memory, ToolPipeline
  3. Workspace Layer: tenant, worker, skill, and persona definitions in workspace/
  4. Infra Layer: Redis, OpenViking, MySQL, external platforms, and proxy layers

The default local mode only requires the first three layers.

Runtime Profiles

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.

Repository Layout

.
├── 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

Development Notes

See docs/ARCHITECTURE.md for architecture details.