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.
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 |
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.
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.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| toucan_router-0.1.0.tar.gz | 127.5 kB | Without provenance | Details for toucan_router-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| toucan_router-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for toucan_router-0.1.0-py3-none-any.whl |
Total release size: 226.8 kB
Release files / toucan_router-0.1.0.tar.gz
| Download URL | toucan_router-0.1.0.tar.gz |
|---|---|
| Size | 127.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c2f556628bf7bb45db3b597e80dcb71ce5621d579c8a3383f2f847af06f29e30
|
|
BLAKE2b-256 checksum How to use checksums |
15d8395d142a1cd20bd9dab3ad1f8676ec0eeffd2fe639ada963c2845ad14e41
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / toucan_router-0.1.0-py3-none-any.whl
| Download URL | toucan_router-0.1.0-py3-none-any.whl |
|---|---|
| Size | 99.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2812ac2e36859160ee54b57703405d1e68964b6d7cce64f49c8b4c317dc1cdf2
|
|
BLAKE2b-256 checksum How to use checksums |
94a0780b583a25493ccf69b95d6ab8ae133fde4ba0cd9ed670837ce4d204b3a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for toucan-router 0.1.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.