Engineering brief

How OpenGov Replaced LangGraph with an Effect-Native Agent Loop

AI Engineer2 min read · saves 17 min

At a glance

Relevance
Practical value
Warnings
None

OpenGov abandoned LangGraph for a custom Effect-native agent loop, gaining tracing, structured concurrency, and safety via human approvals and sandboxing. That trade-off paid off in operational control but demands functional programming expertise.

Custom agent infrastructure can deliver control and safety that general frameworks lack; the trade‑off is steep functional programming expertise.

Summary

OpenGov abandoned LangGraph for a homegrown agent loop built on the Effect TypeScript library. The move gave them full control over tracing, structured concurrency, and model swapping—essential for complex multi-product assistants. The architectural bet paid off in operational control but demands a team comfortable with functional programming and building infrastructure in-house.

They adopted Google's Agent-to-Agent (A2A) protocol as a rigid contract between frontend and backend, ensuring that agent cards and routes are always consistent. Their core pattern is a tools-and-skills architecture: product teams independently build toolkits registered with the model, enabling parallel development of customer‑facing AI capabilities while keeping the agent loop centralized.

Safety is enforced by deterministically interrupting the loop for human approval on mutating tool calls and by running code execution inside ephemeral sandboxes. Long context is handled via rolling summarization with recall, avoiding token‑limit headaches. All of this is observed through Effect’s automatic tracing, which makes cross‑service debugging and profiling straightforward without extra instrumentation.

The talk promotes Effect heavily, but the real signal is that production agents often require custom infrastructure to meet safety, observability, and multi‑team scaling requirements. ‘Tools and skills are all you need’ is an oversimplification, yet it captures a decoupled architecture that lets model quality and business capabilities evolve independently.

Watch the video

This video is blocked due to your privacy settings. To watch this video, please accept YouTube marketing cookies.

Related breakdowns

Get TL;DW

Too Long; Didn't Watch.

A concise breakdowns of the AI and devtools videos that actually matter for engineering leaders.

Free. Weekly. No hype.

Video and thumbnails remain the property of their respective creators. tldw.news provides editorial analysis, commentary, and discovery links to original content.