A software engineer at Block (parent of Square, Cash App, Afterpay) shares how their applied AI team built a production-scale agent platform using Temporal and Kgoose (Goose-as-a-service, written in Kotlin). The talk covers the evolution from a simple synchronous chat API to an async, durable agent loop backed by Temporal workflows and DynamoDB. Key design principles include separating orchestration state from application data, keeping workflows lean while offloading complexity to activities, and using Temporal's versioning primitives to handle frequent AI-driven changes. Real production challenges discussed include managing Temporal event history limits via continue-as-new, LLM context window exhaustion and message compaction, graceful interruption with message history cleanup, human-in-the-loop approval patterns, LLM doom loops, model-agnostic adapters, and guardrails for PII and compliance. The platform now handles over 100 million weekly activities across internal and consumer-facing products including Moneybot, ManagerBot, and G2, running 10,000+ concurrent workflows per namespace.

45m watch time
73 Impressions