Phase 2 · The AI agent — sponsored by Trigger.dev

What We Build on Trigger.dev — step by step

The chat agent assembled one piece at a time — ending with its single controlled doorway into AWS.

💻 Frontend 🧑 Chat UI React · useChat (AI SDK) approve tools from chat 🖥 Backend chat-web · Next.js custom transport · /api/chat app/api/chat/route.ts mints token · starts session new message ⚡ Trigger.dev Cloud managed — open source, self-hostable ⚡ chat.agent task durable session — wakes on messages, sleeps idle server-side history + workspace state tools: kubectl · cloudwatch · redis-cli trigger/chat-agent.ts tasks.trigger() 💥 crash · redeploy · OOM → resumes with full state 🧠 LLM Provider OpenAI / Anthropic — via streamText (AI SDK) prompt + full history tokens + tool calls ↻ every turn 🙋 Human approval (HITL) risky tool paused — waits for ✅ in chat e.g. kubectl delete pod payments-xyz 🛑 pause ✅ resume approval card shows in chat ✅ approve built-in controls: ⏹ stop · 🎛 steer mid-stream · 🌿 branch sessions · 🤝 sub-agents Trigger Realtime — token stream ☁ AWS — Phase 1 EKS cluster payments · orders · redis + CloudWatch logs & metrics (full detail: Phase 1 diagram) read-only tools kubectl get · logs mutations — after ✅ only
✅ Durable session — survives crashes, redeploys & OOM 🙋 HITL — mutations pause for approval in chat 🔑 Per-chat scoped tokens — the browser never sees your secret 🔗 Full Phase 1 + Phase 2 wiring comes later

← / → arrow keys work too · press A to show everything