Hub-and-spoke AI dispatcher — classify short messages, supercharge to agent-ready prompts, fan out to inboxes.
Project description
dispatch
Short message in. Context-rich agent prompt out.
dispatch is a hub-and-spoke CLI that turns 3-10 word human messages into
400-700 token agent-ready prompts, then fans them out to one or more agent
inboxes as markdown. It is the last thing you type before the agent does the
work.
Why it exists: typing a 200-word structured prompt every time you need an
agent to do something is slow. Typing fix the website and letting dispatch
classify, enrich with cached project context, and route the result is fast.
In practice this is a 60-75% token saving vs dumping full context on
every dispatch.
Built by Shift The Culture.
Install
# via pipx (recommended — isolated)
pipx install dispatch-cli
# or via pip
pip install dispatch-cli
# or from source
git clone https://github.com/shifttheculture/dispatch
cd dispatch
pip install -e .
Requires Python ≥3.10.
Quickstart
# Classify + enrich + broadcast to all spoke inboxes
dispatch exec "fix the website"
# Target a specific inbox
dispatch exec "draft launch post" --target content
# Target multiple inboxes
dispatch exec "ship the release" --target code,ops,deploy
# Interactive REPL
dispatch repl
# Show current workspace state
dispatch status
# Tail the dispatch log
dispatch log --tail 20
# List all routes
dispatch routes
How It Works
raw input (3-10 words)
│
▼
┌──────────────┐
│ classify │ keyword scoring across routes.json
└──────┬───────┘
│ category (CODE / CONTENT / OPS / ...)
▼
┌──────────────┐
│ supercharge │ pull matching context sections from cache
└──────┬───────┘ render structured prompt (agent / cwd / files / notes)
│
▼
┌──────────────┐
│ fan out │ write BROADCAST.md or INBOX_<NAME>.md
└──────────────┘
Each dispatch is logged to dispatch_log.jsonl with raw input, category,
agent, and token stats (raw / supercharged / full-context / saved).
Configuration
dispatch reads from a workspace directory. By default this is the current
directory; override with --workspace <path> or DISPATCH_WORKSPACE=<path>.
A workspace contains:
| File | Purpose |
|---|---|
routes.json |
Category → keywords + agent + context sections map |
context_cache.json |
Pre-built context snippets injected per category |
BROADCAST.md |
Auto-written on broadcast dispatches |
INBOX_<NAME>.md |
Auto-written on targeted dispatches |
dispatch_log.jsonl |
Append-only JSONL dispatch history |
Bootstrap a new workspace:
dispatch init my-workspace
cd my-workspace
dispatch exec "hello world"
Adding a Route
Edit routes.json:
{
"PODCAST": {
"description": "Podcast production tasks",
"keywords": ["podcast", "episode", "mic", "edit audio"],
"agent": "Audio producer agent",
"cwd": "~/Media/podcast",
"context_sections": ["podcast_pipeline", "brand_voice"],
"priority_files": ["SHOW_NOTES.md", "episode_template.md"]
}
}
No code change required. Classification and supercharge read routes.json on
every call.
REPL Grammar
> fix the website # one-shot, broadcast to all inboxes
> @code: deploy the staging build # target the CODE inbox
> /target content,ops rewrite bio # target multiple
> /broadcast all hands # force broadcast
> /raw show the prompt without sending
> /last repeat last dispatch
> /status show workspace state
> /inbox code read INBOX_CODE.md
> /log tail last 10 dispatches
> /routes list available routes
> /help
> /quit
Token Economics
For a typical workspace with ~1,800 tokens of cached context:
| Mode | Tokens per dispatch | Savings |
|---|---|---|
| Raw input only | ~10 | (no context — agent asks questions) |
| Full context dump | ~4,800 | 0% |
dispatch supercharged |
~400-700 | 60-75% |
Development
git clone https://github.com/shifttheculture/dispatch
cd dispatch
uv venv
uv pip install -e ".[dev]"
pytest tests/
License
MIT. See LICENSE.
Built in Nashville by Shift The Culture.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dispatch_cli-0.1.1.tar.gz.
File metadata
- Download URL: dispatch_cli-0.1.1.tar.gz
- Upload date:
- Size: 20.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e7b26be2932706a373789551e053e1f00588af8381ce49f14ec5cd173cb529a
|
|
| MD5 |
27a3c78323ed56ad325051af7f4b7b26
|
|
| BLAKE2b-256 |
dd7635335c009f862b02102344c626e7e357f776012e4a6a45fee72a8b20db4e
|
Provenance
The following attestation bundles were made for dispatch_cli-0.1.1.tar.gz:
Publisher:
release.yml on stcmain/dispatch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dispatch_cli-0.1.1.tar.gz -
Subject digest:
1e7b26be2932706a373789551e053e1f00588af8381ce49f14ec5cd173cb529a - Sigstore transparency entry: 1340012131
- Sigstore integration time:
-
Permalink:
stcmain/dispatch@f6242d5609d0cb62dcab5281c2ed5ad1d5cc6933 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/stcmain
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f6242d5609d0cb62dcab5281c2ed5ad1d5cc6933 -
Trigger Event:
push
-
Statement type:
File details
Details for the file dispatch_cli-0.1.1-py3-none-any.whl.
File metadata
- Download URL: dispatch_cli-0.1.1-py3-none-any.whl
- Upload date:
- Size: 26.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
405dfc156e9050407cf48a1f17e2b6d4063e9e70812d5eefd1168b5d099f03b4
|
|
| MD5 |
e30484a2a683775be8030a5f7caaa823
|
|
| BLAKE2b-256 |
b3ede84684129d8c1c6b6dad241fefb13cc2b154447efd4ddc2fb3d4f467d501
|
Provenance
The following attestation bundles were made for dispatch_cli-0.1.1-py3-none-any.whl:
Publisher:
release.yml on stcmain/dispatch
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
dispatch_cli-0.1.1-py3-none-any.whl -
Subject digest:
405dfc156e9050407cf48a1f17e2b6d4063e9e70812d5eefd1168b5d099f03b4 - Sigstore transparency entry: 1340012176
- Sigstore integration time:
-
Permalink:
stcmain/dispatch@f6242d5609d0cb62dcab5281c2ed5ad1d5cc6933 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/stcmain
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@f6242d5609d0cb62dcab5281c2ed5ad1d5cc6933 -
Trigger Event:
push
-
Statement type: