Engineering brief

How OpenGov Replaced LangGraph with an Effect-Native Agent Loop

This engineering brief covers How OpenGov Replaced LangGraph with an Effect-Native Agent Loop, with practical context for AI and developer-tool decisions.

AI Engineer

The Brief

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.

Decision relevance

Read this for workflow impact, implementation trade-offs, and the claims that need technical scrutiny before they reach team planning.

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.

Why It Matters

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

Editorial analysis

Key claims

  • Betting on a custom agent loop and rigid protocols gives unprecedented control, but demands deep functional programming investment.

Practical use cases

  • Use this as input for tooling evaluation, workflow planning, and technical due diligence.

Risks / caveats

  • The advocacy for Effect itself; the library is secondary to the architectural pattern.

Who should care

  • Engineering managers, tech leads, and CTOs evaluating AI or developer tooling decisions.

Related topics

Bottom Line

Betting on a custom agent loop and rigid protocols gives unprecedented control, but demands deep functional programming investment.

Watch

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.