Powering AI Agents with Temporal and Kgoose
summary
Block builds KGoose (Goose as a service) on Temporal with DynamoDB for data and MCP for tools, migrating from sync to async to avoid timeouts and support long-running sessions; it uses Temporal continue-as-new to avoid 50 MB event history limits, a detached cancellation scope for one-hour inactivity, message compaction to handle LLM context limits, and two human-in-the-loop patterns (approval and recommendation). Platform handles 100M+ weekly activities, ~10,000 concurrent workflows per namespace, and largely succeeds but still needs fixes for non-determinism and tool “doom loops.”
AI-written summary · about
chapters (26)
- 0:00Introduction to AI agents
- 1:51Building Goose and KGoose
- 3:59Why Temporal for async workflows
- 5:24Temporal agent workflow design
- 9:23Orchestration vs data separation
- 11:27Workflow lean design principles
- 12:51Production challenges faced
- 13:11Long-running session management
- 14:36Graceful interruption handling
- 16:47Human-in-the-loop patterns
- 17:09System limits and constraints
- 18:31Continue-as-new optimizations
- 19:57LLM context limits and compaction
- 21:23Model selection and adapters
- 22:26Guardrails and validations
- 23:49Tool doom loops and recovery
- 24:52LLM error categorization
- 25:55Rapid AI development challenges
- 26:59Workflow versioning with GetVersion
- 28:48Handling non-determinism
- 29:29Powering G2 and Manager Bot
- 31:19Money Bot suggestions and workflows
- 32:45Scaling agent workflows to production
- 33:49Temporal usage and scale
- 34:31Future of KGoose and Temporal
- 35:36Q&A session
related talks
27mThe accidental AI revolution
24mGoose: an open source AI agent
12mCodename Goose: An open source local AI agent built on MCP
51mSupercharging Spring AI: Scalable AI Agents with Koog + Spring AI + Spring Boot
24mDurable Agents: long running AI workflows in a flakey world
33mFrom Prototype to Production: Making Agentic AI Systems Reliable
51mReliable AI Agents Using Domain Modeling with Koog in Java
34mOpen Source AI Agents on User-Owned Infra: K3s, MCP, & GPU Sharing in Practice
