Minions: Stripe’s one-shot, end-to-end coding agents—Part 2

Minions are Stripe’s homegrown coding agents, responsible for more than a thousand pull requests merged each week. Though humans review the code, minions write it from start to finish. Learn how they work, and how we built them.

Alistair Gray
12 min readintermediate
--
View Original

Overview

This article delves into the development and implementation of minions, Stripe's unattended coding agents, which autonomously produce pull requests without human-written code. It discusses the infrastructure, agent design, and optimization strategies that enable these agents to operate effectively within Stripe's development environment.

What You'll Learn

1

How to leverage devboxes for efficient coding agent deployment

2

Why blueprints enhance the functionality of coding agents

3

How to implement context gathering for coding agents using rule files

4

When to utilize the Model Context Protocol (MCP) for networked tool calls

Prerequisites & Requirements

  • Understanding of cloud development environments and containerization
  • Familiarity with AWS EC2 and CI/CD practices(optional)

Key Questions Answered

How does Stripe ensure minions operate in a safe environment?
Stripe's minions operate in isolated devboxes that prevent access to sensitive data and production services. This design allows minions to run with full permissions while minimizing the risk of destructive actions, as they are confined to a controlled environment specifically designed for development.
What are blueprints and how do they function in minion operations?
Blueprints are a coding framework that combines deterministic workflows with agent-like flexibility, allowing minions to execute tasks efficiently. They consist of nodes that can either run deterministic code or agent loops, ensuring that certain subtasks are completed reliably while allowing for adaptive decision-making.
What role does the Model Context Protocol (MCP) play in minion functionality?
The Model Context Protocol (MCP) enables minions to dynamically fetch information necessary for task completion, such as internal documentation and build statuses. By integrating MCP, Stripe ensures that minions can access a curated set of tools and resources, enhancing their operational efficiency.
How does Stripe's minion system handle feedback and iteration?
Stripe's minions are designed to integrate automated feedback loops that allow them to iterate on their tasks. They utilize a subset of tests and linters before pushing changes to CI, ensuring that issues are addressed early and minimizing reliance on CI for feedback.

Key Statistics & Figures

Weekly pull requests merged by minions
1,300
This figure represents the increase from 1,000 pull requests merged weekly since the previous article in the series.
Number of tests available for feedback
over three million
This extensive suite of tests provides automated feedback for minions, allowing them to iterate on their tasks effectively.
Number of MCP tools in Toolshed
nearly 500
These tools are available for various internal systems and SaaS platforms used at Stripe.

Technologies & Tools

Cloud Infrastructure
AWS EC2
Used to host devboxes for Stripe engineers and minions.
Protocol
Model Context Protocol (mcp)
Facilitates networked tool calls for coding agents.

Key Actionable Insights

1
Implement isolated devboxes to enhance the safety and efficiency of coding agents.
By creating a controlled environment for coding agents, organizations can prevent unauthorized access to sensitive data while allowing agents to operate autonomously. This setup is crucial for maintaining security while maximizing productivity.
2
Utilize blueprints to streamline agent workflows and ensure reliable task execution.
Blueprints allow for a hybrid approach that combines deterministic processes with flexible decision-making, which can lead to improved efficiency and reduced errors in coding tasks.
3
Incorporate the Model Context Protocol (MCP) to enhance the capabilities of coding agents.
By integrating MCP, coding agents can access a wider range of tools and information dynamically, which significantly improves their ability to complete tasks accurately and efficiently.

Common Pitfalls

1
Failing to provide adequate context for coding agents can lead to poor decision-making.
Without proper guidance, agents may struggle to follow best practices or utilize the correct libraries, resulting in inefficient or erroneous code changes.

Related Concepts

Devops Practices For Coding Agents
Agent-based Programming
Cloud Development Environments