Skip to main content

Toucan Router

Toucan Router connects WhatsApp, Microsoft Teams and email to coding agents running in T3 Code. When an approved person messages a chat you've routed, Toucan wakes the T3 thread that owns that chat. It then tracks the request until the thread replies, promises a follow-up, escalates to you or closes it.

It is a small, single-operator tool for people who already run Claude Code or Codex threads in T3 Code and want colleagues to be able to ask those threads for work.

WhatsApp (wacli) ─┐                       ┌─> T3 thread "project-a" ─┐
Teams (bot)     ──┼─> toucan sync ─ wake ─┤                          ├─> toucan reply / promise / escalate
Email (notmuch) ──┘    (allowlist)        └─> T3 thread "project-b" ─┘        │
                                                                              v
                                    WhatsApp, Teams (as the bot), or a draft to you

What it does:

  • Reads approved chats only. People are matched by WhatsApp JID, Entra ID or email address, never by display name.
  • Wakes a thread through its T3 webhook. The wake carries counts and times, never message text.
  • Tracks every request: claim, reply --final, reply --promise WHAT --due 3h, done, close, escalate, resume. Overdue promises and unclaimed requests send an alert.
  • Sends replies to WhatsApp, posts them in Teams as a bot, or drafts them to you. Email is read-only: Toucan never sends email.
  • Uploads proof videos with toucan upload, through any uploader command you configure.
  • Rotates T3 threads whose context gets large, and hands requests to a fallback thread on another provider while one is rate-limited.

How it compares with Hermes Agent: docs/hermes-comparison.md.

Requirements

  • Linux with systemd user services, Python 3.11 or newer, and uv or pipx.
  • T3 Code running on the same machine.
  • At least one source: wacli for WhatsApp, the Toucan Teams bot for Teams, or notmuch for email.

Quick start

Toucan is set up by an agent, not by hand. Paste this into Claude Code or Codex on the machine that runs T3 Code:

Install toucan-router with `uv tool install toucan-router`, then run `toucan guide` and follow
it to set Toucan up for me. Ask me before adding anyone or turning anything on.

The agent installs the package, asks for your name, timezone and number, discovers your chats, adds the people and routes you pick, wires each owner thread to T3, and turns on the timer. toucan doctor shows what's configured and what's left at any point.

The guides are in docs/ and inside the package (toucan guide --list):

Topic Covers
setup-t3 owner threads, webhook tasks, hook files
setup-whatsapp wacli pairing and sync
setup-teams the Teams bot: registration, approval, routing
setup-email read-only email through notmuch
setup-upload the upload hook, and Loom through toucan-router-tools
setup-sheets Google Sheets through toucan-router-tools
setup-alerts ntfy or any alert URL
configuration every config key
operations the request lifecycle, rotation, escalations, recovery
telemetry the one anonymous usage event a day, and how to turn it off

toucan guide prints AGENTS.md, the instructions agents follow.

How much you need to set up

Most people stop after the first or second tier.

Tier Adds Outside accounts Background services
1 T3 Code + WhatsApp a dedicated phone number wacli sync, toucan-sync timer
2 + email (read-only) none new your mail sync
3 + Teams one Azure Bot, approved once by a Teams admin, and a public HTTPS URL toucan-bot

Packages

Package Commands What it's for
toucan-router toucan the router. Standard library only.
toucan-teams-bot toucan-bot Teams: receives chat messages and posts replies. Needed for any Teams route.
toucan-router-tools toucan-upload-loom, toucan-sheets optional tools for agents: Loom uploads (docs/setup-upload.md) and Google Sheets (docs/setup-sheets.md). The router doesn't need them.

Status

Version 0.1. T3 Code is the only supported agent host. Toucan reads some of T3's internal tables for optional features (rotation, rate-limit fallback, resume). When a T3 update changes them, those features turn off, toucan doctor warns, and wakes keep working.

WhatsApp support uses wacli, an unofficial client. Use a dedicated number: WhatsApp can ban numbers that use unofficial clients. The Loom uploader in toucan-router-tools also uses Loom's unofficial API and is marked experimental. Read SECURITY.md before routing chats from people you don't fully trust: their messages reach agents that can run commands.

Toucan sends one anonymous usage event a day (version and counts, never chat content). Turn it off with TOUCAN_TELEMETRY=0 or toucan config set settings.telemetry false; see docs/telemetry.md.

Development

uv venv && uv pip install -e . pytest && .venv/bin/python -m pytest -q
(cd bot && uv venv && uv pip install -e '.[test]' && .venv/bin/python -m pytest -q)
(cd tools && uv venv && uv pip install -e . pytest && .venv/bin/python -m pytest -q)

MIT licensed. See LICENSE.

Metadata

Release files for toucan-router 0.3.0

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

Source distribution (sdist)

Source distribution for toucan-router 0.3.0
File Size Uploaded Provenance Actions
toucan_router-0.3.0.tar.gz 276.8 kB Without provenance Details for toucan_router-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for toucan-router 0.3.0
File Interpreter ABI Platform Actions
toucan_router-0.3.0-py3-none-any.whl Python 3 none any Details for toucan_router-0.3.0-py3-none-any.whl

Total release size: 449.8 kB

Release files / toucan_router-0.3.0.tar.gz

Download URL toucan_router-0.3.0.tar.gz
Size 276.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9d71ad00e452d6af77880d650e7aec1877bc759572c22fc3c64ba06503549bc2
BLAKE2b-256 checksum
How to use checksums
0ac483a88813e5f3f1d00865044fc0c1062a2da4fa4e74589e409e789ae86584
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.9

Release files / toucan_router-0.3.0-py3-none-any.whl

Download URL toucan_router-0.3.0-py3-none-any.whl
Size 173.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cf5280af400ac9f6a99671b234d981e926e6487420ad65f94ce8a364fee609ad
BLAKE2b-256 checksum
How to use checksums
962d1e922886881b74bf0dfcbfb8ad54cb84eed45febf2838ec2d1f1884bcda6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.9

Security for toucan-router 0.3.0

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