Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions examples/claude/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,33 @@ python examples/claude/multi_agent.py

This pattern enables agent pipelines, handoffs, and collaborative workflows where specialized agents build on each other's work.

### Telegram Customer Support (`telegram_support.py`)

Three Telegram bots acting as customer support departments for a fictional telco "TeleCo":

- **Juan** — Internet Support (troubleshooting, router issues, plan upgrades)
- **Martin** — TV Support (channels, set-top box, HBO/sports packages)
- **Cecilia** — Billing (charges, credits, disputes, discounts)

A customer chats with one bot, then contacts another — each bot sees the full history from all departments via Memtrace shared sessions. Features include:

- **Cross-department memory sharing** — recall/search by `session_id` (sees all bots), write with `agent_id` (attribution)
- **Session resume on restart** — finds active sessions in Memtrace by `account_id` metadata
- **Photo support** — customers can send photos (e.g. error screenshots) via multimodal Claude messages
- **Identity verification** — first-name lookup against test customer database

Requires 3 Telegram bot tokens (create via [@BotFather](https://t.me/BotFather)):

```bash
export BOT_TOKEN_INTERNET="<telegram bot token>"
export BOT_TOKEN_TV="<telegram bot token>"
export BOT_TOKEN_BILLING="<telegram bot token>"

python examples/claude/telegram_support.py
```

Test customers: `nacho`, `maria`, `alex` — message any bot with a first name to verify.

## Memory Loop Pattern

Both examples follow the same core pattern:
Expand Down
1 change: 1 addition & 0 deletions examples/claude/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
anthropic>=0.40.0
memtrace-sdk>=0.1.0
python-telegram-bot>=22.0 # telegram_support.py only
Loading