Concepts
Durable Objects
8 shared DOs (Router/Simple/Orchestrator/etc.). script_name bindings. Single deploy, multi-app reuse. SQLite state.
TL;DR: 8 DOs shared via script_name bindings. Telegram/GitHub bots reference duyetbot-agents. Zero-dupe code. SQLite persistence.
Table of Contents
8 DOs
Deployed in duyetbot-agents:
| DO | Purpose | Called By |
|---|---|---|
| RouterAgent | Classify/route | Platform Agents |
| SimpleAgent | Quick Q&A | Router |
| OrchestratorAgent | Multi-step | Router |
| HITLAgent | Approvals | Router |
| CodeWorker | Code tasks | Orchestrator |
| ResearchWorker | Research | Orchestrator |
| GitHubWorker | GitHub ops | Orchestrator |
| DuyetInfoAgent | Duyet info | Router |
Bindings
Telegram wrangler.toml:
Pattern
Shared DO: Single code/deploy. Multi-app bindings. SQLite state survives restarts.
Benefits: 2400 LOC reused. Global replication. Free.
Code Snippet
apps/shared-agents/src/index.ts
Quiz: script_name vs Local DO?
A: script_name shares cross-worker; Local app-only ✅
Related: Deployment -> | Batching ->
Deploy: bun run deploy:shared-agents -> All 8 DOs live!