Skip to main content

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


Download files

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

Source Distribution

dispatch_cli-0.1.1.tar.gz (20.0 kB view details)

Uploaded Source

Built Distribution

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

dispatch_cli-0.1.1-py3-none-any.whl (26.4 kB view details)

Uploaded Python 3

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

Hashes for dispatch_cli-0.1.1.tar.gz
Algorithm Hash digest
SHA256 1e7b26be2932706a373789551e053e1f00588af8381ce49f14ec5cd173cb529a
MD5 27a3c78323ed56ad325051af7f4b7b26
BLAKE2b-256 dd7635335c009f862b02102344c626e7e357f776012e4a6a45fee72a8b20db4e

See more details on using hashes here.

Provenance

The following attestation bundles were made for dispatch_cli-0.1.1.tar.gz:

Publisher: release.yml on stcmain/dispatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for dispatch_cli-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 405dfc156e9050407cf48a1f17e2b6d4063e9e70812d5eefd1168b5d099f03b4
MD5 e30484a2a683775be8030a5f7caaa823
BLAKE2b-256 b3ede84684129d8c1c6b6dad241fefb13cc2b154447efd4ddc2fb3d4f467d501

See more details on using hashes here.

Provenance

The following attestation bundles were made for dispatch_cli-0.1.1-py3-none-any.whl:

Publisher: release.yml on stcmain/dispatch

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page