Scaling AI-Driven Code Automation and Engineering Productivity at Spotify
spotify_/_anthropic · Media & Entertainment · 2026 · source Agentic: yes · promotional bias: low · source-backed · extracted with prompt 0.5.6 (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: AI-assisted software engineering at large monorepo scale
Spotify's codebase was growing far faster than its engineering headcount, making manual migrations, maintenance, and idea-to-production cycles too slow for the volume of product work the company wanted to ship.
Constraints:
- The backend monorepo alone has more than 20 million lines of code and Spotify also maintains thousands of polyrepos.
- Hundreds of teams previously repeated the same migrations manually across thousands of components.
- Automated PRs reduce human review, so test automation and CI verification must be strong enough to protect production quality.
- The system must support iOS and macOS verification, internal tools, monorepo and polyrepo workflows, and agent-authored pull requests.
- Productivity metrics need to connect PRs and deployments to work items, experiments, rollouts, user value, and cost.
Architecture
Spotify evolved fleet-management automation into Honk, an internal coding-agent platform built on Claude's agent SDK. Honk runs agents in Kubernetes pods, gives them tools and CI verification, supports custom user-added tools in V2, and automates code migrations, Slack-triggered tasks, UI generation, prototypes, and PRs across monorepos and polyrepos. The surrounding engineering system relies on standardized components, stronger test automation, continuous deployment, attribution metrics, and internal prototype infrastructure.
Diagram confidence: reconstructed (reconstructed from prose).
flowchart LR A["Spotify engineers and non-engineers"] --> B["Honk platform"] B --> C["Claude agent SDK"] C --> D["Kubernetes runtime"] C --> E["Internal tools"] B --> F["Spotify repositories"] B --> G["CI verification"] G --> F F --> H["Production deployment pipeline"] H --> I["Work-item attribution"] A --> J["Prototype infrastructure"] J --> C J --> F
Components
| Component | Role | Interacts with |
|---|---|---|
Honk platform |
Spotify's internal agentic automation platform for code migrations, code tasks, PRs, and broader automation. | Claude agent SDK, Kubernetes runtime, Internal tools, CI verification, Spotify repositories |
Claude agent SDK |
Agent runtime used by Honk to inspect code, use tools, and perform coding tasks. | Kubernetes runtime, Internal tools, Spotify repositories |
Kubernetes runtime |
Execution environment where Honk agents run. | Honk platform, Claude agent SDK |
Internal tools |
Spotify tools available to agents, including user-added tools in Honk V2. | Honk platform, CI verification |
CI verification |
Linux and macOS builds, tests, simulators, and automated quality gates used to validate agent-authored changes. | Honk platform, Spotify repositories, Production deployment pipeline |
Spotify repositories |
Large backend monorepo, mobile codebases, and thousands of polyrepos where agents make changes. | Honk platform, CI verification, Production deployment pipeline |
Production deployment pipeline |
Continuous deployment system that ships validated changes and produces deployment signals. | Spotify repositories, Work-item attribution |
Work-item attribution |
Measurement layer connecting PRs and deployments to planned work, A/B tests, rollouts, and user value. | Production deployment pipeline |
Prototype infrastructure |
Internal app-store and end-to-end prototype environment for engineers and non-engineers to build and share ideas. | Claude agent SDK, Spotify repositories |
Spotify engineers and non-engineers |
Users who request tasks, review outcomes, ship prototypes, and shift from implementation work toward problem selection. | Honk platform, Prototype infrastructure |
Data flow
Maintenance or product tasks enter Honk through migrations, Slack requests, direct agent sessions, or prototype workflows. Claude agents inspect repository context, use internal tools, mutate code, run CI and platform-specific verification, and submit or auto-merge PRs when quality gates pass. PRs and deployments are later connected to work items, experiments, rollouts, and user-value signals.
3 supporting quotes
Why this architecture
Spotify needed code-aware agents that could work across massive repositories, but successful automation depended on verification and standardization as much as model capability. Honk therefore wraps Claude agents in Kubernetes, repository access, internal tools, CI builds, macOS/iOS verification, and measurement systems rather than relying on one-shot code generation.
3 supporting quotes
Models used: Claude · Claude agent SDK · LLMs as judge · Claude Code
Scale
- Spotify's codebase was growing seven times faster than engineering headcount.“we identified that our code base was growing much much faster than the number of engineers we had to support like seven times faster.”transcript, stated
- Spotify's backend monorepo is more than 20 million lines of code.“our backend monor repo is more than 20 million lines of code”transcript, stated
- Spotify has thousands of small polyrepos in addition to monorepos.“we still have thousands of small poly repos for that that remains.”transcript, stated
- Spotify reports about 4,500 production deployments every day.“we make something like 4 and a half thousand production deployments every day.”transcript, stated
- Spotify reports roughly 2,900 engineers.“It's like thousands of engineers, right? >> Yeah, it's 2,900 engineers”transcript, stated
- Spotify reports a 75%+ improvement in PR frequency attributable to AI tooling.“We're seeing a 75% plus improvement in PR frequency, for example, uh that we can directly attribute to AI tooling.”transcript, stated
- Spotify reports about 73% of PRs directly attributed to AI-authored changes.“I think by now 73ish percent of PRs are directly attributed to being AI authored.”transcript, stated
- Spotify prototype infrastructure can produce working prototypes within one or two hours.“within an hour or two, you have a working prototype that you can start sharing with people”transcript, stated
Alternatives considered (roads not taken)
Manual migrations by every team
Rejected because: Hundreds of teams repeating migrations across thousands of components took months and barely kept up.
Deterministic scripts for every code change
Rejected because: Code's API surface made static transformations explode into edge cases.
One-shot LLM code changes
Rejected because: Early attempts that simply put code in front of the model did not work well.
Keep an LLM judge in Honk permanently
Rejected because: Spotify removed it after models and agent behavior improved enough that the judge was no longer needed.
Keep teams in the loop for every automated PR
Rejected because: Automated changes required better test automation so teams would not need to inspect every PR before merge.
Patterns
tool-use-orchestration (agent-architecture)
Honk runs Claude agents with access to repository tools, CI builds, user-added tools, and task interfaces such as Slack.
eval-driven-development (evaluation)
Spotify made CI verification, test automation, ROI measurement, and PR/deployment attribution central to scaling agent-authored changes.
structured-output-contract (engineering-practice)
Spotify standardized components, ownership, and codebase patterns so agents could reason from consistent examples.
llm-as-judge (evaluation)
Earlier Honk iterations used an LLM judge to raise PR success rates before later removing it as agents improved.
human-in-the-loop-gate (governance)
Spotify moved some migration PRs out of direct team review only after strengthening automation, while engineers still guide problem choice and validate higher-level product direction.
context-engineering (context)
Spotify benefits from agents finding relevant examples in monorepos and from consistent repository conventions that make context easier to interpret.
Tradeoffs
Migration automation strategy
Chose LLM agents with decomposition and verification over deterministic codemods for every edge case.
Rationale: Static scripts became too complex as API-surface edge cases multiplied.
Honk verification architecture
Chose CI/test verification as the enduring gate over keeping an LLM judge as the main checker.
Rationale: The judge helped early success rates, but stronger models and agents let Spotify remove it while relying on verification infrastructure.
Quality versus speed
Chose automated quality practices to enable speed over treating speed and reliability as a tradeoff.
Rationale: Spotify argues faster delivery requires encoding quality into tests, skills, and tools rather than relying on slower human checks.
Repository strategy for agents
Chose continued standardization and monorepo-friendly context over letting patterns diverge across repositories.
Rationale: Consistent code gives agents better examples and reduces confusion.
Prototype enablement
Chose internal app-store and simple end-to-end prototype paths over requiring product ideas to wait for full engineering-team allocation.
Rationale: Natural-language prototyping lets engineers and non-engineers validate ideas quickly in real app contexts.
Gotchas (what bit them)
Static code-migration scripts hit a complexity ceiling.
Root cause: The same API can appear in many forms, requiring variable and state tracking across a huge API surface.
Resolution: Spotify moved from deterministic scripts toward LLM-based agents with decomposition, iteration, and verification.
Early LLM one-shot code edits did not work.
Root cause: The models and Spotify's prompting/orchestration approach were not mature enough.
Resolution: Spotify iterated through judges, decomposition, internal hacks, and multiple Honk versions.
Agent-authored PRs expose weak test automation.
Root cause: Teams used to review every change, so post-test automation could be looser.
Resolution: Spotify strengthened test automation and verification before relying on automated merges.
Verification must cover platform-specific environments.
Root cause: iOS work requires macOS builds and sometimes simulator-level checks.
Resolution: Honk can run CI builds on Linux and macOS and integrate simulator-based tests for some workflows.
Agent performance depends on codebase consistency.
Root cause: Inconsistent frameworks and patterns confuse agents looking for examples in the repository.
Resolution: Spotify continued standardization work across codebases, tools, and frameworks.
Evaluation
Spotify evaluates the program through CI/build verification, test automation, PR success history, PR-frequency lift, AI-authored PR share, deployment counts, work-item attribution, A/B tests, rollouts, productivity, cost, and quality metrics.
Metrics: 20-30% to 80% PR success improvement from the early judge · 4,500 production deployments per day · 2,900 engineers · 75%+ improvement in PR frequency attributable to AI tooling · 73% of PRs attributed to AI-authored changes · Quality metrics kept neutral while speed improved · PRs and deployments connected to work items, A/B tests, and rollouts
3 supporting quotes
Outcomes
- Honk evolved into a ubiquitous tool for migrations, Slack-triggered tasks, and code automation.
- Spotify reports a 75%+ improvement in PR frequency attributable to AI tooling.
- Spotify reports roughly 73% of PRs directly attributed to AI-authored changes.
- Spotify reports roughly 4,500 production deployments per day.
- Spotify says quality metrics stayed neutral while speed significantly improved.
- Internal prototype infrastructure lets engineers, non-engineers, and senior executives build working app prototypes quickly.
Spotify reports 2,900 engineers, a backend monorepo over 20 million lines of code, thousands of polyrepos, 4,500 production deployments per day, 75%+ PR-frequency improvement, 73% AI-authored PRs, and prototypes built in one or two hours.