Back office ops · Production

What 1Password learned using AI agents to refactor a Go monolith

The problem

1Password's Go monolith (B5) lacked clearer service boundaries and independent scaling characteristics needed to support Unified Access—its platform for human and agent-driven workflows at high request rates and low latency—and decomposing a multi-million-line production system is a sequencing-constrained problem.

First attempt

During service extraction, agents violated sequencing invariants—attempting to backfill UUID columns before updating insertion code and treating shared tables as independently owned—and filled context gaps with unverified assumptions, including inferring an identifier format as ULID and propagating it through a series of changes that required a full session rollback.

Workflow diagram · grounded in source
1
Agentic approach initiated
trigger
“Coming up with an actionable plan for tackling this problem sounded like a good job for agents.”
2
Code and runtime analysis
ai_action
“We used Go SSA analysis to understand code structure, SQL parsing to identify data dependencies, and a DataDog MCP integration to bring in runtime coupling data.”
3
Extraction order produced
output
“Together, these gave us a domain ownership map, a coupling graph, and a prioritized extraction order.”
4
Deterministic manifest generation
ai_action
“We generated a deterministic manifest of every call site using SSA, classified those sites into a small number of patterns, and defined explicit templates for each one.”
5
Parallel agent execution
ai_action
“we ran multiple agents in parallel using git worktrees so that changes remained isolated”
6
Escalation on ambiguity
human_review
“When they encounter something outside the specification, the system is designed to surface that rather than attempting to resolve it implicitly.”
Reported outcome

The agentic toolchain produced a clear, defensible extraction order for B5, and agents successfully migrated more than 3,000 MustBegin call sites in a matter of hours.
Complex service extraction yielded a 20-30% productivity improvement, and the instrumentation added for the analysis also improved end-to-end transaction visibility in DataDog.

Reported metrics
Call sites migratedmore than 3,000
Migration execution timea matter of hours
Productivity improvement for complex service extraction20-30%
End-to-end transaction visibilityimproved our end to end transaction visibility in DataDog
Reported stack
Go SSADataDoggit worktrees
Source
https://1password.com/blog/what-we-learned-using-ai-agents-to-refactor-a-monolith
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

The agentic toolchain produced a clear, defensible extraction order for B5, and agents successfully migrated more than 3,000 MustBegin call sites in a matter of hours.

What tools did this team use?

Go SSA, DataDog, git worktrees.

What results were reported?

Call sites migrated: more than 3,000; Migration execution time: a matter of hours; Productivity improvement for complex service extraction: 20-30%; End-to-end transaction visibility: improved our end to end transaction visibility in DataDog (source-reported, not independently verified).

What failed first in this deployment?

During service extraction, agents violated sequencing invariants—attempting to backfill UUID columns before updating insertion code and treating shared tables as independently owned—and filled context gaps with unveri…

How is this back office ops AI workflow structured?

Agentic approach initiated → Code and runtime analysis → Extraction order produced → Deterministic manifest generation → Parallel agent execution → Escalation on ambiguity.