Skip to main content

WorkForce

Pre-release (0.1.x). Part of the ProtocolCity suite with WorkLane and BluePrint. Expect sharp edges; file issues.

Employment infrastructure for agents.

WorkForce turns AI agents into a staffed workforce. Each worker has identity papers (a contract and a prompt), a schedule, a budget, and a tamper-evident shift ledger. One daemon dispatches every shift; one board — the Roster — shows you who is employed, who is on the floor, and what every shift cost.

Install the whole suite (recommended)

brew install protocolcity/tap/protocolcity
protocolcity found ~/my-city
protocolcity serve --with-engines
# → http://127.0.0.1:8801/  (Map · Desk · Roster)

WorkForce alone

pip install protocolcity-workforce

workforce roster                     # who is employed
workforce dispatch <worker> --dry-run   # rehearse one shift, spend nothing
workforce ledger <worker>            # the shift record
workforce daemon                     # the scheduler — one service, serves the board
workforce open                       # open the Roster board in your browser
workforce-mcp                        # stdio MCP for chat agents

MCP (chat agents)

# Point at a city roster (BluePrint path):
export WORKFORCE_ROSTER=~/my-city/.protocolcity/workforce/local/roster.json
# or: export WORKFORCE_DATA_DIR=~/my-city/.protocolcity/workforce
python -m workforce.mcp --author you
# tools: wf_status · wf_roster · wf_show · wf_hire · wf_dispatch

Wire next to WorkLane MCP (python -m worklane.mcp / worklane-mcp) so agents can hire and dispatch as well as file work orders. Prefer dry_run=true on hire/dispatch until you trust the seat.

Part of the ProtocolCity suite: pairs naturally with WorkLane (the ticket desk your workers pull work from), and runs standalone against any queue that can answer a ready-count URL. Everything is local-first — the roster is a JSON file on your machine, the ledger is an append-only record, and there is no cloud dependency.

Quickstart (same as alone)

pip install protocolcity-workforce

workforce roster
workforce dispatch <worker> --dry-run
workforce ledger <worker>
workforce daemon
workforce open

The board serves at http://127.0.0.1:8797 by default.

How it works

  • The roster is data. Start from roster.example.json and keep your real roster at local/roster.json (gitignored) or point $WORKFORCE_ROSTER at it. One row per worker: identity, contract path, model, cron schedule, budget, queue URL.
  • Workers claim tickets, then work them. A worker is bound to one working directory and pulls from its queue — a WorkLane ready-endpoint works out of the box, but any URL that returns a count will do. Empty queue means the shift is skipped, not billed.
  • Every shift lands in the ledger. Outcome, passes, tokens in/out, and cost are appended per shift — the record your budgets and reports read.
  • Schedules are data, not services. The daemon is the only OS service you run (workforce daemon-plist prints a launchd agent for macOS); hiring, pausing, or rescheduling a worker is a roster edit, not a deploy.

Configuration

All configuration is optional — WorkForce works out of the box from the repo root with no env vars set. For installed-package deployments or multi-directory setups, use these variables:

Variable Default Description
WORKFORCE_DATA_DIR ./local (CWD) Home directory for WorkForce runtime state (roster, ledger, daemon heartbeat). Set this when running workforce commands from outside the repo root so the daemon and board always find their data.
WORKFORCE_PORT 8797 HTTP port for workforce board and workforce daemon.
WORKFORCE_ROSTER $WORKFORCE_DATA_DIR/local/roster.json Explicit roster path — overrides the default search under WORKFORCE_DATA_DIR.
WORKFORCE_DESK http://127.0.0.1:8799 WorkLane / Desk API URL used by the board's activity join.
WORKFORCE_CITYHALL http://127.0.0.1:8796 City-hall API URL used by the board's city join.
WORKFORCE_BRAND city Board brand mode: city (ProtocolCity suite) or standalone.
PROTOCOLCITY_TEMPLATES (sibling checkout) Path to ProtocolCity templates for workforce hire --no-plant.

Installed-package quickstart:

export WORKFORCE_DATA_DIR=~/.workforce
mkdir -p "$WORKFORCE_DATA_DIR/local"
# copy roster.example.json → $WORKFORCE_DATA_DIR/local/roster.json and edit
workforce roster
workforce daemon

launchd (macOS): run workforce daemon-plist while WORKFORCE_DATA_DIR is set and the plist will bake it into EnvironmentVariables automatically.

Hiring a worker

workforce hire --help

Hiring writes the worker's papers (contract + prompt) and adds the roster row. Contracts are the law a worker reads before every shift — a worker whose contract says it is not armed will refuse to work, by design.

Requirements

Python 3.9+. macOS and Linux. Agent CLIs (such as claude) are invoked per shift using the command template in the roster row — bring whichever agent vendor you employ.

License

Apache-2.0. Copyright 2026 ProtocolCity.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

protocolcity_workforce-0.1.5.tar.gz (122.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

protocolcity_workforce-0.1.5-py3-none-any.whl (108.2 kB view details)

Uploaded Python 3

File details

Details for the file protocolcity_workforce-0.1.5.tar.gz.

File metadata

  • Download URL: protocolcity_workforce-0.1.5.tar.gz
  • Upload date:
  • Size: 122.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for protocolcity_workforce-0.1.5.tar.gz
Algorithm Hash digest
SHA256 b63a9ecee0d1d0d2b0922e2519e1048680eb251ef60958f77829945933166aa0
MD5 011c5c153de1ff5e621ae51136aa027b
BLAKE2b-256 24b6c442b740cfba958189f1727c7f3a1dc84ff3982bfe24ce1d43d359b40912

See more details on using hashes here.

File details

Details for the file protocolcity_workforce-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for protocolcity_workforce-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 44d57762ee323889cb38b48a0588d3613df8662b9e79e5a3bedab749eaad17f8
MD5 671a0b8d24e0a7f1010f022701ba3cea
BLAKE2b-256 6eaba1cab7f62efd2b2d20adaaac4b2bc9bc9bdfba05de0231f69f0381750719

See more details on using hashes here.

Release history Release notifications | RSS feed

0.1.7

2 files

0.1.6

2 files

This release

0.1.5 This release

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

0.1.0

2 files

0.0.1

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page