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; the Roster — visual in the BluePrint suite, queryable via CLI and MCP — shows who is employed, who is on the floor, and what every shift cost.

brew install protocolcity/tap/blueprint
blueprint setup ~/my-city
blueprint serve --root ~/my-city --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 — the only OS service you run
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

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.
WL_DESK_URL / TP_DESK_URL / WORKFORCE_DESK / WORKFORCE_DESK http://127.0.0.1:8799 WorkLane desk base (desk_base_url()). First non-empty wins in that order. WORKFORCE_DESK is a retired-name fallback. Board join, daemon event-trigger, desk-drop, and hire's default lane queue_url share this reader.
WORKFORCE_CITYHALL (unset) City-hall API URL for the board's city join (the prior :8796 default is retired).
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.

Metadata

Release files for protocolcity-workforce 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for protocolcity-workforce 0.1.9
File Size Uploaded Provenance Actions
protocolcity_workforce-0.1.9.tar.gz 280.6 kB Without provenance Details for protocolcity_workforce-0.1.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for protocolcity-workforce 0.1.9
File Interpreter ABI Platform Actions
protocolcity_workforce-0.1.9-py3-none-any.whl Python 3 none any Details for protocolcity_workforce-0.1.9-py3-none-any.whl

Total release size: 475.1 kB

Release files / protocolcity_workforce-0.1.9.tar.gz

Download URL protocolcity_workforce-0.1.9.tar.gz
Size 280.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a7125eea1912e30032e4f35aaee592f34e2f621bf36c63f3d4dfb1f31ab41e5a
BLAKE2b-256 checksum
How to use checksums
18e704b165bb8e24ebb0bef5a2c4affef99b560f4dcdda210659bc71467bcde1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / protocolcity_workforce-0.1.9-py3-none-any.whl

Download URL protocolcity_workforce-0.1.9-py3-none-any.whl
Size 194.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4b6d4890101aa8680e5e548e0d63513eaef02f942404ccf4b0f313c06d354a70
BLAKE2b-256 checksum
How to use checksums
5ac9afd85ab7a4f3cd7b5527d6adaa5fb0693abfc68707b3a4a658fd422785e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for protocolcity-workforce 0.1.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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