Building Enterprise AI Agents with Code-First Approach for Trust and Auditability

coinbase · Finance · 2025 · 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: Enterprise agent platform engineering for regulated internal automation

Coinbase needed a repeatable way to build internal AI agents that automate decision-heavy enterprise workflows without losing the engineering controls required in financial services. The problem was not simply whether LLMs could draft or triage work; it was how to host, version, observe, evaluate, audit, and hand off those agents as production software services that touch business data and regulated legal processes.

Constraints:

Architecture

Coinbase formed an Agentic AI Tiger Team to create paved roads for enterprise agents: code-first LangGraph/LangChain-style graphs hosted like services, with deterministic data nodes separated from probabilistic LLM nodes. Each graph starts from an SOP or job description, then runs through typed code, version control, traces, evaluation harnesses, human review, and immutable audit records. LangSmith provides the hosted observability layer, while reference implementations and onboarding materials let other engineers reuse the standardized stack instead of rediscovering hosting, testing, review, and audit patterns.

Diagram confidence: reconstructed (reconstructed from prose).

flowchart LR
  agentic-ai-tiger-team[Agentic AI Tiger Team] --> agent-graph-standard[Agent graph standard]
  sop-job-description[SOP job description] --> agent-graph-standard
  agent-graph-standard --> code-first-agent-graph[Code-first agent graph]
  agent-graph-standard --> reference-implementations[Reference implementations]
  code-first-agent-graph --> deterministic-data-nodes[Deterministic data nodes]
  code-first-agent-graph --> llm-nodes[LLM nodes]
  code-first-agent-graph --> observability-platform[Observability platform]
  code-first-agent-graph --> human-review-workflow[Human review workflow]
  code-first-agent-graph --> audit-record[Audit record]
  deterministic-data-nodes --> unit-tests-and-ci[Unit tests and CI]
  llm-nodes --> evaluation-harness[Evaluation harness]
  llm-nodes --> observability-platform
  evaluation-harness --> llm-judge[LLM judge]
  observability-platform --> audit-record
  human-review-workflow --> audit-record
  reference-implementations --> engineering-teams[Engineering teams]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Agentic AI Tiger Team Focused team responsible for shipping initial automations and standardizing the agent stack. Agent graph standard
SOP job description Up-front definition of success criteria, allowed sources, and human deferral points. Agent graph standard
Agent graph standard Reusable blueprint for hosting, observability, testing, review, and auditability across internal agents. Code-first agent graph, Reference implementations
Code-first agent graph LangGraph/LangChain-style service graph with typed interfaces, version control, and explicit node boundaries. Deterministic data nodes, LLM nodes, Observability platform, Human review workflow, Audit record
Deterministic data nodes Data fetch and transform steps that can be unit-tested with conventional software practices. Unit tests and CI
Unit tests and CI Engineering gates for reproducible deterministic steps and deployable code-first graphs. Deterministic data nodes
LLM nodes Probabilistic model-powered steps that draft, triage, summarize, compare, or reason within the agent graph. Evaluation harness, Observability platform
Evaluation harness Curated datasets, judge checks, and confidence scoring used to evaluate LLM node behavior. LLM judge
LLM judge Second model used for spot-checks and confidence scoring of LLM-powered steps. Evaluation harness
Observability platform Hosted LangSmith tracing layer that records tool calls, retrieval, decisions, outputs, artifacts, and version diffs. Audit record
Human review workflow Intentional approval, feedback, and long-tail tuning loop built into the agent user experience. Audit record
Audit record Immutable execution record tying inputs, tools, reasoning path, and approver to each agent output. —
Reference implementations Reusable examples and onboarding materials that let engineering teams self-serve the standardized patterns. Engineering teams
Engineering teams Coinbase teams adopting the paved-road patterns for new enterprise automations. —

Data flow

A team first writes the agent's SOP and identifies a workflow suitable for automation. The implementation becomes a code-first graph that separates deterministic data-fetch or transform nodes from LLM nodes. Deterministic nodes are unit-tested and gated through CI, while LLM nodes run against curated evaluation datasets and may be spot-checked by another LLM judge. During execution, every tool call, retrieval, decision, and output is traced, and an immutable audit record ties outputs to inputs, tools, reasoning path, and human approval.

4 supporting quotes
“We write the agent’s SOP first — what “good” looks like, what sources it can use, where it must defer to a human.”article, stated
“Use code‑first graphs to separate deterministic data nodes (unit‑tested) from probabilistic LLM nodes (evaluated).”article, stated
“were able to self-serve on the patterns. We built this with an “observability‑first” mindset. Every tool call, retrieval, decision, and output is traced. Data‑fetch and transform steps are deterministic and unit‑tested. LLM steps run with evaluation harnesses and curated datasets.”article, stated
“An immutable record showing which data was used, how it was used, the reasoning the agent followed, and who approved the output is created for each execution of an agent.”article, stated

Why this architecture

Coinbase chose code-first graphs because regulated enterprise agents need reproducibility, typed interfaces, version control, CI gates, tracing, and auditability. Low-code tools were useful for discovery, but production flows needed the separation and observability of software services. The platform also made human review and audit records first-class features rather than bolt-ons, which matched the legal and regulatory use cases that motivated the work.

4 supporting quotes
“enterprise AI agents are just software services — but with one big twist: not only do they need the same rigor we apply to any production system”article, stated
“high‑code won out. Code‑first graphs (e.g., LangGraph/LangChain patterns) gave us typed interfaces, version control”article, stated
“observability, evaluation, and human‑in‑the‑loop controls as first‑class concerns. In short, we could engineer agents like services, not like chats. ## A six‑week push to pave the roads We formed a focused team with a simple mandate: ship a handful of meaningful automations,”article, stated
“We designed for auditability from the start, which is essential in our legal and regulatory flows and best practice for all other flows.”article, stated

Models used: LLMs · LangGraph · LangChain · LangSmith · LLM judge · AWS Bedrock AgentCore

Scale

Alternatives considered (roads not taken)

Use low-code agent tools for core automations.

Rejected because: Coinbase found low-code helpful for prototyping but too noisy and difficult to reproduce, unit test, or gate in CI for long-running operational flows.

“Low‑code tools are great for discovery and rapid prototyping; you can wire up tools quickly and learn fast.”article, stated
“the more tools and instructions you load into a prompt, the more “context noise” you introduce, making outputs harder to reproduce”article, stated

Treat agents as chat experiences rather than services.

Rejected because: The team needed typed interfaces, version control, observability, evaluation, and human controls, so they engineered agents as service graphs.

“Code‑first graphs (e.g., LangGraph/LangChain patterns) gave us typed interfaces, version control, clean separation of “data” nodes from “LLM” nodes”article, stated
“observability, evaluation, and human‑in‑the‑loop controls as first‑class concerns. In short, we could engineer agents like services, not like chats. ## A six‑week push to pave the roads We formed a focused team with a simple mandate: ship a handful of meaningful automations,”article, stated

Rely on agent autonomy without explicit human review.

Rejected because: Coinbase intentionally designed handoff, feedback, and approval into the workflow because legal and business processes needed trust and long-tail tuning.

“We use a second LLM as a judge for spot‑checks and confidence scoring. And we treat human review as an intentional part of the system, not a workaround.”article, stated
“Design the handoff and feedback loop into the UX. Long‑tail tuning is real, and it’s faster when feedback is captured where work happens.”article, stated

Add runtime complexity such as sidecars by default.

Rejected because: The team preferred the simplest viable Python-only runtime and reserved extra complexity for cases that actually demanded it.

“Prefer the simplest viable runtime. In practice, Python‑only builds let us move quickly; we only add complexity (e.g., sidecars) when the use case demands it.”article, stated

Patterns

tool-use-orchestration (agent architecture)

Coinbase modeled enterprise automations as code-first agent graphs where tools, data nodes, LLM nodes, and human review are explicit service components rather than implicit prompt instructions.

“The outcome is an agent graph where LLM calls are one node in a larger, testable, monitored system — by design.”article, stated
“Engineer the graph, not the chat. Use code‑first graphs to separate deterministic data nodes (unit‑tested) from probabilistic LLM nodes (evaluated).”article, stated

observability-tracing (operations)

The platform traced tool calls, retrieval, decisions, outputs, artifacts, and version differences so teams could debug probabilistic and deterministic parts of agent runs.

“Every tool call, retrieval, decision, and output is traced. Data‑fetch and transform steps are deterministic and unit‑tested.”article, stated
“Trace everything, diff runs across versions, and store artifacts with the run. You can’t tune what you can’t see.”article, stated

eval-driven-development (quality)

Coinbase evaluated probabilistic LLM nodes with curated datasets, a second LLM judge, confidence scoring, and conventional tests for deterministic graph steps.

“Data‑fetch and transform steps are deterministic and unit‑tested. LLM steps run with evaluation harnesses and curated datasets.”article, stated
“We use a second LLM as a judge for spot‑checks and confidence scoring.”article, stated

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

Human approval and feedback were designed into the UX for workflows where agents draft with references or affect regulated business processes.

“think “summarize and triage,” “collect and compare,” and “draft with references for a human to approve,” across a few different internal domains.”article, stated
“Keep a human in the loop — intentionally. Design the handoff and feedback loop into the UX.”article, stated

safety-policy-enforcement (governance)

The agent stack created immutable records of inputs, tool use, reasoning path, and approvals to satisfy compliance and trust requirements.

“auditable down to inputs and decision traces to ensure safe and secure use.”article, stated
“Design for auditability on day one. Reference every claim to a source, and tie the output to the exact inputs, tools, and reasoning path.”article, stated

prompt-versioning (change management)

Coinbase's code-first approach made agents versionable through existing pipelines, with run diffs and artifact storage supporting controlled changes over time.

“they must be hosted in our infrastructure (which is geared toward Golang service hosting), versioned through our pipelines”article, stated
“Trace everything, diff runs across versions, and store artifacts with the run.”article, stated

Tradeoffs

Choose a code-first agent graph for production automations.

Chose High-code LangGraph/LangChain-style graphs with typed interfaces and version control. over Low-code tool assembly for core automations..

Rationale: Low-code accelerated discovery, but high-code made outputs reproducible, steps testable, and production controls attachable.

“Low‑code tools are great for discovery and rapid prototyping; you can wire up tools quickly and learn fast.”article, stated
“For the automations we intended to scale, high‑code won out. Code‑first graphs (e.g.”article, stated

Separate deterministic and probabilistic nodes in the graph.

Chose Unit-tested data nodes and separately evaluated LLM nodes. over A single opaque prompt or conversation that mixes data transforms and model calls..

Rationale: The split made failures diagnosable and runs reproducible while allowing specialized evaluation for LLM behavior.

“Code‑first graphs (e.g., LangGraph/LangChain patterns) gave us typed interfaces, version control, clean separation of “data” nodes from “LLM” nodes”article, stated
“That split keeps failures diagnosable and runs reproducible. * Treat observability as a requirement. Trace everything, diff runs across versions, and store artifacts with the run.”article, stated

Make human review part of the system.

Chose Designed handoff and feedback loops for approval and tuning. over Treating human review as an ad hoc workaround or removing it to maximize autonomy..

Rationale: Human feedback was necessary for trust, long-tail tuning, and regulated workflows, even if it introduces process friction.

“We use a second LLM as a judge for spot‑checks and confidence scoring. And we treat human review as an intentional part of the system, not a workaround.”article, stated
“Design the handoff and feedback loop into the UX. Long‑tail tuning is real, and it’s faster when feedback is captured where work happens.”article, stated

Prefer a simple runtime until complexity is justified.

Chose Python-only builds for speed and simplicity. over Adding sidecars or other runtime complexity by default..

Rationale: A simpler runtime reduced early development friction while leaving room to add complexity for use cases that demanded it.

“Prefer the simplest viable runtime. In practice, Python‑only builds let us move quickly; we only add complexity (e.g., sidecars) when the use case demands it.”article, stated

Invest in shared observability infrastructure.

Chose A hosted LangSmith implementation adopted as the company-approved agent observability platform. over Per-agent tracing and debugging setups..

Rationale: A common platform gave teams a consistent way to trace, evaluate, and debug every agent.

“Our investment in building out a hosted LangSmith implementation was adopted by the AI team at Coinbase”article, stated
“we now have a consistent, company approved observability platform for all our agents.”article, stated

Gotchas (what bit them)

Prompt-heavy low-code prototypes became harder to reproduce as tool count and instruction count grew.

Root cause: Loading multiple tools and instructions into one prompt introduced context noise and hid individual testable steps.

Resolution: Coinbase kept low-code for discovery but moved core automations to code-first graphs with typed interfaces and explicit nodes.

“the more tools and instructions you load into a prompt, the more “context noise” you introduce, making outputs harder to reproduce”article, stated
“That’s fine for exploration, less ideal for long‑running, operational flows.”article, stated

Enterprise agent outputs could not be trusted without complete audit trails.

Root cause: Agents touched business data and legal/regulatory workflows, so teams needed evidence of what data was used, how it was used, and who approved the result.

Resolution: The platform created an immutable audit record for every execution and reused that capability across agents.

“An immutable record showing which data was used, how it was used, the reasoning the agent followed, and who approved the output is created for each execution of an agent.”article, stated
“Once we built these capabilities for one agent, we were able to leverage auditability for all of them.”article, stated

An underspecified SOP made the agent design itself suspect.

Root cause: If a human new hire could not succeed with the procedure, an agent would not have enough operational guidance either.

Resolution: Coinbase wrote the agent's SOP before building the agent and used it to define good outputs, allowed sources, and human deferral rules.

“Build the “job description” before the agent. We write the agent’s SOP first — what “good” looks like, what sources it can use”article, stated
“If a new hire couldn’t succeed with that SOP, an agent won’t either.”article, stated

Teams could not tune or debug probabilistic agent behavior without full traces.

Root cause: LLM steps are probabilistic, so ordinary unit tests do not provide enough production visibility into decisions and outputs.

Resolution: Coinbase made observability a requirement, traced all execution artifacts, and used evaluation harnesses for LLM nodes.

“We built this with an “observability‑first” mindset. Every tool call, retrieval, decision, and output is traced.”article, stated
“Treat observability as a requirement. Trace everything, diff runs across versions, and store artifacts with the run.”article, stated

Making agents fully autonomous would have reduced scale friction but weakened trust for sensitive workflows.

Root cause: Long-tail tuning and regulated decisions required feedback and approval where work happens.

Resolution: The team treated human review as an intentional system component rather than a workaround.

“And we treat human review as an intentional part of the system, not a workaround.”article, stated
“Long‑tail tuning is real, and it’s faster when feedback is captured where work happens.”article, stated

Evaluation

Coinbase used different evaluation modes for different graph nodes: deterministic data-fetch and transform steps were unit-tested and gated, while LLM nodes ran against curated datasets, used a second LLM judge for spot-checks and confidence scoring, and relied on trace diffs and stored artifacts for version comparison.

Metrics: Two automations in production after six weeks. · Two additional automations completed end-to-end in development. · More than 25 hours saved per week. · New agent build time cut from 12+ weeks to under a week. · More than half a dozen engineers self-serving the patterns.

4 supporting quotes
“Data‑fetch and transform steps are deterministic and unit‑tested. LLM steps run with evaluation harnesses and curated datasets.”article, stated
“We use a second LLM as a judge for spot‑checks and confidence scoring.”article, stated
“By the end of the six weeks, two automations were in production with measurable time savings, two more were completed end‑to‑end in development”article, stated
“published the paved roads that cut new build time from 12+ weeks to under a week while upskilling engineers to self‑serve.”article, stated

Outcomes

The work moved beyond a single prototype: it covered multiple internal business domains, produced reusable reference implementations and onboarding materials, enabled more than half a dozen engineers to self-serve, and established common observability for all Coinbase agents.

4 supporting quotes
“put two into production with more than 25 hours saved per week, completed two more end‑to‑end in development”article, stated
“published reference implementations and onboarding materials other teams could adopt.”article, stated
“more than half a dozen engineers were able to self-serve on the patterns.”article, stated
“we now have a consistent, company approved observability platform for all our agents.”article, stated