Back office ops · Production

Duolingo builds an agentic feature flag remover using Codex CLI and Temporal

The problem

Duolingo engineers needed agentic tooling to automate simple but repetitive tasks like feature flag removal, and lacked a clean, reliable pattern for building agents that operate directly on their codebase.

First attempt

Two parallel implementations — one using langchain with an internal toolset called Baymax, and one using fast-agent with the Github MCP — were in development for 1–2 weeks before being abandoned when Codex CLI was released and worked immediately with a single prompt.

Workflow diagram · grounded in source
1
User initiates via self-service UI
trigger
“Through the Platform Self-Service UI, a workflow is kicked off in gateway, Temporal's dispatcher namespace”
2
Fetch GitHub account name
integration
“We first run an activity (Temporal-speak for "task") to get the user's Github account name, then kick off a new activity to do the main work”
3
Codex CLI performs flag removal
ai_action
“We clone the repo to a temporary directory, then ask Codex CLI to do its work. Once the agent completes, assuming it has found changes to make, it creates a PR”
4
PR created and assigned
output
“it creates a PR, assigning it to the user's account name we pulled earlier”
Reported outcome

Development was described as quick, easy, and immediately successful — a prototype was running in approximately one day and a productionized version was ready within one week.

Reported metrics
Prototype build time~1 day
Productionized version build time~1 week
Prior approach development time before abandonment1-2 weeks
Reported stack
TemporalCodex CLIECSlangchainfast-agentBaymaxGithub MCPGithub
Source
https://blog.duolingo.com/buildingaiagents/
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

Development was described as quick, easy, and immediately successful — a prototype was running in approximately one day and a productionized version was ready within one week.

What tools did this team use?

Temporal, Codex CLI, ECS, langchain, fast-agent, Baymax, Github MCP, Github.

What results were reported?

Prototype build time: ~1 day; Productionized version build time: ~1 week; Prior approach development time before abandonment: 1-2 weeks (source-reported, not independently verified).

What failed first in this deployment?

Two parallel implementations — one using langchain with an internal toolset called Baymax, and one using fast-agent with the Github MCP — were in development for 1–2 weeks before being abandoned when Codex CLI was rel…

How is this back office ops AI workflow structured?

User initiates via self-service UI → Fetch GitHub account name → Codex CLI performs flag removal → PR created and assigned.