back_office_ops · saas · workflow

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

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.

How it works
Common implementation structure
How this type of workflow is generally built, generalized across documented cases — not tied to any one vendor's stack. Click any stage to read what happens there. Specific products that implement these stages appear in “Tools commonly seen” below.
Stage 1 · Agentic approach initiated
The need to decompose a large Go monolith prompted the team to apply agentic tooling for analysis and planning.
Tools used
Go SSADataDoggit worktrees
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.

What failed first

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.

Results
Time saveda matter of hours
Volumemore than 3,000
Source

https://1password.com/blog/what-we-learned-using-ai-agents-to-refactor-a-monolith

How we source this →

Grounding & classification
Source type: technical build writeup
22 fields verified against source quotes.
agentic workflowcode generationmulti agent workflowcode diff prfailure mode describedhuman review describedmetric backednamed customerproduction runtime claimedtools describedworkflow describedsoftwareemployee productivitytime savedtechnical build writeupback office opsagentic task execution