Building and Scaling OG Assist: An AI Agent Platform for Government ERP Software

opengov · Government · 2026 · source Agentic: yes · promotional bias: med · source-backed · extracted with prompt 0.5.5 (schema v2)

Generated from extraction.json — do not edit by hand. Every claim cites verbatim source evidence; stated means the quote directly asserts the claim, implied means it supports it indirectly.

Problem

Domain: Government ERP AI agents

OpenGov needed to deploy a unified AI agent, OG Assist, across government ERP product suites so users could ask questions, invoke domain tools, act on product data, and receive contextual UI help while preserving safety, observability, evaluation, long-context behavior, and human control over sensitive operations.

Constraints:

Architecture

OG Assist is a first-party agent button embedded across OpenGov product suites. A custom Effect-native agent loop, built after moving from LangGraph, coordinates language-model streaming, dependency-injected model swapping, A2A-style agent route/schema contracts, domain toolkits, product-suite tools, human approval interrupts, ephemeral sandboxes, rolling-summary memory, generative UI primitives, CI evals, user feedback, and Effect tracing. Product teams build tools and skills for their domains, while the agent loop can inspect page context, make tool calls, query suite data, highlight UI next steps, generate files in sandboxes, and render forms at runtime. OpenGov also reuses the same tools/skills pattern internally with Claude, Cursor, and Claude agents to accelerate engineering work.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  opengov-product-suites[OpenGov product suites] --> og-assist-chat-interface[OG Assist chat interface]
  opengov-product-suites --> product-suite-tools[Product suite tools]
  og-assist-chat-interface --> effect-native-agent-loop[Effect native agent loop]
  og-assist-chat-interface --> human-approval-ui[Human approval UI]
  og-assist-chat-interface --> generative-ui-primitives[Generative UI primitives]
  effect-native-agent-loop --> language-model-abstraction[Language model abstraction]
  effect-native-agent-loop --> a2a-route-schema[A2A route schema]
  effect-native-agent-loop --> toolkits-and-skills[Toolkits and skills]
  toolkits-and-skills --> product-suite-tools
  effect-native-agent-loop --> human-approval-ui
  effect-native-agent-loop --> sandbox-runner[Sandbox runner]
  effect-native-agent-loop --> rolling-summary-memory[Rolling summary memory]
  effect-native-agent-loop --> tracing-and-observability[Tracing and observability]
  effect-native-agent-loop --> evaluation-and-feedback-loop[Evaluation and feedback loop]
  toolkits-and-skills --> internal-development-agents[Internal development agents]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
OpenGov product suites ERP products such as budgeting, procurement, asset management, permitting, and utility billing where OG Assist is embedded. OG Assist chat interface, Product suite tools
OG Assist chat interface Unified first-party chat button and UI surface available across product suites. OpenGov product suites, Effect native agent loop, Human approval UI, Generative UI primitives
Effect native agent loop Custom TypeScript agent loop with Effect-based tracing, structured concurrency, logging, schema, error handling, and fine-grained control. OG Assist chat interface, Language model abstraction, A2A route schema, Toolkits and skills, Human approval UI, Sandbox runner, Rolling summary memory, Tracing and observability, Evaluation and feedback loop
Language model abstraction Effect AI chat/language-model abstraction with stream text and dependency injection for hot-swapping models. Effect native agent loop
A2A route schema Agent-to-agent inspired route, schema, agent-card, metadata, and frontend/backend contract layer. Effect native agent loop
Toolkits and skills Collections of product/domain tools registered with the language model for lookup, action, and UI assistance. Effect native agent loop, Product suite tools, Internal development agents
Product suite tools Domain-specific tools built by product teams, such as utility-billing rate code lookup and page highlighting. OpenGov product suites, Toolkits and skills
Human approval UI Accept/reject prompt shown when a tool call requires human approval, especially for mutating operations. OG Assist chat interface, Effect native agent loop
Sandbox runner Ephemeral isolated execution environment for code execution, file creation, and downloadable artifacts. Effect native agent loop
Rolling summary memory Conversation memory that keeps recent messages plus a rolling summary for earlier context. Effect native agent loop
Generative UI primitives Registered UI primitives such as forms that the agent can assemble at runtime. OG Assist chat interface
Tracing and observability Effect spans and distributed traces that profile request paths, bottlenecks, failures, and cross-service behavior. Effect native agent loop
Evaluation and feedback loop Thumbs-up/down feedback, calls/emails, and CI automated evals against real completions. Effect native agent loop
Internal development agents Claude, Cursor, and Claude-agent workflows used internally with tools and skills to read, write, review, and ship code. Toolkits and skills

Data flow

A user opens OG Assist from the product navigation bar. The agent receives product and page context, follows an A2A-influenced route/schema contract, and runs through the Effect-native agent loop. The loop streams text from a dependency-injected language model, registers toolkits built by product teams, and calls suite-specific tools to look up data or act on the page. If a tool requires approval, the loop deterministically interrupts and presents accept/reject UI. If code or file creation is needed, the agent spins up an ephemeral sandbox and tears it down after use. Long conversations are condensed into rolling summaries plus recent messages. Feedback thumbs and CI evals over real completions feed improvements to tools, skills, prompts, and the harness, while Effect spans and distributed traces expose bottlenecks and failures.

4 supporting quotes
“OG Assist is this little button on the top of all of our products in the in the navigation bar. And what's cool is all of our product suites and product teams have built tools and skills in order to power this button. So, for example, if I open up this this”transcript, stated
“the agent is able to make tool calls in order to look up information against data inside of that suite. So, it's really cool to be able to kind of first-party create these experiences through the capability that we've built called OG Assist. Okay, so just a”transcript, stated
“we decided to move over to our own kind of Effect Native Agent Loop to have full regency over this uh Agent Loop”transcript, stated
“we have evals that run against real completions, so we could test the prompt against, "Hey, did it hit some tools? Did it do what it's supposed to do?"”transcript, stated

Why this architecture

OpenGov chose a custom Effect-native agent loop because LangGraph was adequate early on but became limiting as the team and use cases scaled. Effect gave them one foundation for schema, error handling, logging, traces, structured concurrency, and agent-loop control. A2A-style contracts aligned frontend and backend expectations, while tools and skills let product teams extend one unified assistant across domains. Human approvals, sandboxing, rolling summaries, evals, and tracing address production risks specific to government ERP: mutating actions, code/file execution, long-context recall, regression detection, and cross-service debugging.

4 supporting quotes
“originally we were on LangGraph and that was fine until the team really started to scale uh and our use cases started to evolve.”transcript, stated
“with Effect is now propagated throughout the entire Agent Loop, like the tracing, structured concurrency, the logging, everything is more fine-grained control”transcript, stated
“name of the agent, a description, etc., right? And having this kind of rigorous protocol, this rigorous spec really helped drive our development and drive alignment because, you know, all we had to do was um align with this spec and follow this spec and we knew that this was kind of the”transcript, stated
“Humans in the loop. So, this is a really cool feature we built where we deterministically interrupt the agent loop if there is a tool call approval required.”transcript, stated

Models used: Effect AI language model abstraction · Claude · Cursor · Claude agents

Scale

Alternatives considered (roads not taken)

Continue using LangGraph

Rejected because: LangGraph was fine early, but the agents team needed more control as the team scaled and use cases evolved.

“originally we were on LangGraph and that was fine until the team really started to scale uh and our use cases started to evolve.”transcript, stated
“decided to move over to our own kind of Effect Native Agent Loop to have full regency over this uh Agent Loop such that if we have complex use cases or features that we need to build, we could kind of get in we we had full control of the of the Agent Loop.”transcript, stated

Let each suite build its own isolated assistant

Rejected because: OpenGov wanted one first-party OG Assist experience powered by tools and skills from all product teams.

“all of our product suites and product teams have built tools and skills in order to power this button. So, for example, if I open up this this if I click this button and I open up OG Assist, it says, "Hey, I'm going to ask about rate codes, which is very”transcript, stated
“to be able to kind of first-party create these experiences through the capability that we've built called OG Assist.”transcript, stated

Always include all conversation messages

Rejected because: Long conversations overloaded context windows and legacy model token limits.

“we have hit many hurdles like with especially with legacy models now like with uh token limits or just way too much just completely overloaded with context”transcript, stated
“having some sort of um rolling summarization was more effective than you know always stuffing in the latest and most recent uh messages”transcript, stated

Let the agent execute sensitive actions directly

Rejected because: Mutating operations and risky tool calls need explicit user control in government ERP workflows.

“if an agent tries to make a tool call that it needs human approval for, it'll show this UI and the human uh, can click accept or reject.”transcript, stated
“especially when the agent's trying to do a mutating operation and always always always making sure that, um, humans are in the driver's seat.”transcript, stated

Run agent code and file creation in production context

Rejected because: Code execution and file generation needed isolation from production systems.

“whenever an agent tries to execute code or tries to create files, it does so in a sandbox. So, we gave our agents sandboxes such that it could spin up these sandboxes on demand and it could use those sandboxes to honestly write code, execute code, create”transcript, stated
“safe ephemeral isolated space such that the agent can can can take action in there and not and we don't have to worry about uh any risk to you know our our production systems.”transcript, stated

Patterns

tool-use-orchestration (agent-runtime)

OG Assist registers toolkits and product-specific skills with the model so the agent can query suite data, highlight UI elements, create files, and act inside OpenGov products.

“all of our product suites and product teams have built tools and skills in order to power this button.”transcript, stated
“you add it to a tool kit, which is a collection of tools, and then you can register this this tool kit with the with the language model.”transcript, stated

human-in-the-loop-gate (safety)

The agent loop deterministically interrupts for approval-required tool calls and presents accept/reject UI to the user.

“deterministically interrupt the agent loop if there is a tool call approval required.”transcript, stated
“the human uh, can click accept or reject. So, explicitly rejecting or explicitly accepting, uh, the action that the agent is trying to make.”transcript, stated

privacy-preserving-processing (safety)

Code execution and file creation happen inside ephemeral isolated sandboxes so agent actions do not risk production systems.

“safe ephemeral isolated space such that the agent can can can take action in there and not and we don't have to worry about uh any risk to you know our our production systems.”transcript, stated

context-compaction (memory)

OG Assist summarizes older conversation turns and keeps only recent messages to manage token limits in long conversations.

“rolling summarization was more effective than you know always stuffing in the latest and most recent uh messages”transcript, stated

agent-memory (memory)

The agent can recall earlier conversation context from the rolling summary when a user refers back to something discussed much earlier.

“when you have this rolling summary of a a really long conversation, then you could do recall over that uh summarization.”transcript, stated

observability-tracing (operations)

Effect spans feed distributed traces that show request paths, timings, bottlenecks, failures, and cross-service behavior.

“when you use these effect functions, they all get kind of tagged automatically with like these spans, and kind of the span gets picked up and feeds into these traces”transcript, stated
“you could profile all your traces, right? So, this takes a total of this many seconds and you can see where the bottleneck is here.”transcript, stated

eval-driven-development (quality)

OpenGov combines user thumbs feedback with CI evals over real completions to improve prompts, tools, skills, and the harness.

“we have this thumbs up and thumbs down mechanism and here someone is able to tell us, "Hey, this this worked really well.”transcript, stated
“those automated evals in conjunction with collecting feedback really help us, um, improve our uh, our our tools, our skills, um, our harness”transcript, stated

structured-output-contract (integration)

The A2A protocol and agent cards provide a rigorous schema/contract for frontend and backend agent routes.

“this rigorous spec really helped drive our development and drive alignment”transcript, stated
“this was kind of the contract that our front end and back end would both consume and and produce.”transcript, stated

model-routing (model-ops)

Dependency injection lets the Effect loop hot-swap language models without changing core loop logic.

“since we're kind of doing dependency injection, we could pass in a different language model if we were to uh hot swap to another one”transcript, stated

Tradeoffs

Agent runtime

Chose custom Effect-native agent loop over continuing with LangGraph.

Rationale: The team traded framework convenience for full loop control, Effect-native tracing, structured concurrency, logging, and model hot-swap flexibility.

“decided to move over to our own kind of Effect Native Agent Loop to have full regency over this uh Agent Loop”transcript, stated
“all the cool things you get with Effect is now propagated throughout the entire Agent Loop”transcript, stated

Architecture contract

Chose A2A-inspired protocol and agent cards over ad hoc frontend/backend contracts.

Rationale: A rigorous shared spec improved development alignment and extensibility.

“we found this very useful for uh defining our agent routes. So, for example, in the back end and our model and our schema to follow this kind of agent protocol.”transcript, stated
“A2A has a lot of extensions, right? So, you could extend the protocol uh add in like metadata. Uh there's also A2UI.”transcript, stated

Context strategy

Chose rolling summaries plus recent-message window over stuffing all latest/recent messages into context.

Rationale: Summaries preserve earlier conversation memory while limiting token growth.

“rolling summarization was more effective than you know always stuffing in the latest and most recent uh messages”transcript, stated
“the the memory component comes in cuz when you have this rolling summary of a a really long conversation, then you could do recall over that uh summarization. And um you know, if you ask the agent, "Hey, remember that thing that we talked about?" then the agent within the thread will be like,”transcript, stated

Action safety

Chose human approval UI for approval-required tool calls over fully autonomous mutating operations.

Rationale: Explicit user approval builds trust and keeps humans in control of sensitive government ERP changes.

“the human uh, can click accept or reject. So, explicitly rejecting or explicitly accepting, uh, the action that the agent is trying to make.”transcript, stated
“always always always making sure that, um, humans are in the driver's seat.”transcript, stated

Agent extension model

Chose tools and skills owned by product teams over one monolithic assistant capability set.

Rationale: Distributed tool development lets each product suite add domain capabilities behind one shared OG Assist interface.

“all of our product suites and product teams have built tools and skills in order to power this button.”transcript, stated
“So, we believe that tools and skills are really all you need. And in this case, you could see on the left, we have this tool called get dad joke.”transcript, stated

Gotchas (what bit them)

A generic agent framework became limiting as production use cases grew.

Root cause: LangGraph was acceptable early, but the team needed full control of the agent loop for complex features and fine-grained tracing/logging/concurrency.

Resolution: Migrate to a custom Effect-native agent loop.

“originally we were on LangGraph and that was fine until the team really started to scale uh and our use cases started to evolve.”transcript, stated
“Agent Loop such that if we have complex use cases or features that we need to build, we could kind of get in we we had full control of the of the Agent Loop. And not only that, but now we're fully on Effect. So, all the cool things you get with Effect is now propagated throughout the entire Agent”transcript, stated

Sensitive tool calls require deterministic interruption rather than model discretion.

Root cause: Mutating operations in government ERP data can have real business impact.

Resolution: Interrupt the loop for approval-required tool calls and require explicit accept/reject input.

“this ensures that, uh, you know, we're building trust and also ensuring that, uh, you know, we're being safe, especially when the agent's trying to do a mutating operation”transcript, stated

Agent code execution can threaten production systems.

Root cause: File creation and code execution may have side effects if run in ordinary application context.

Resolution: Use on-demand ephemeral sandboxes for code, files, and generated artifacts.

“whenever an agent tries to execute code or tries to create files, it does so in a sandbox.”transcript, stated
“Um and it's it's really cool cuz they also get uh tied uh tear down at the end so um in this example I said, "Hey, create a PDF uh for the folks of the AI Engineer Conference 2026.”transcript, stated

Long conversations overloaded context limits.

Root cause: Including all recent messages became ineffective as conversations grew longer, especially with legacy models.

Resolution: Use rolling summarization plus a small window of recent messages and recall over the summary.

“with especially with legacy models now like with uh token limits or just way too much just completely overloaded with context especially as conversations get longer.”transcript, stated

Agent failures can be difficult to debug across product-team APIs.

Root cause: Agentic systems integrate with multiple teams, APIs, and platform capabilities.

Resolution: Use Effect's automatic spans and traces to profile bottlenecks, failures, and cross-service data.

“really important, especially working in agentic systems where we're we're integrating with other teams and other APIs and other um other platform capabilities.”transcript, stated
“If there's a failure, you can cross-reference data across services.”transcript, stated

Evaluation

OpenGov evaluates OG Assist with in-product thumbs-up/thumbs-down feedback, calls and emails, automated CI evals against real completions, prompt checks for expected tool hits and intended actions, and observability traces that show request flow, timings, bottlenecks, failures, and cross-service behavior.

Metrics: thumbs-up/thumbs-down feedback · support calls and emails · CI eval pass/fail · expected tool hit · intended action completion · trace spans · component execution time · bottlenecks · cross-service failure context

3 supporting quotes
“we have this thumbs up and thumbs down mechanism and here someone is able to tell us, "Hey, this this worked really well.”transcript, stated
“we have evals that run against real completions, so we could test the prompt against, "Hey, did it hit some tools? Did it do what it's supposed to do?"”transcript, stated
“you could profile all your traces, right? So, this takes a total of this many seconds and you can see where the bottleneck is here.”transcript, stated

Outcomes

The case describes a real production agent workload across all OpenGov product suites and government customers, with cross-team tool ownership and production controls for evals, feedback, tracing, sandboxing, and approval gates.

4 supporting quotes
“you'll be able to see a real use case and workload uh with AI agents.”transcript, stated
“OG Assist started to to grow and we started to integrate OG Assist into all our products.”transcript, stated
“we're building tools and skills for customer-facing uh agents and and that has been great, but we're also building them internally as well”transcript, stated
“You've made it to the end. Let's build agents that ship to production.”transcript, stated