Workflow · Production

Brex builds autonomous agents for technical tasks by closing CI and review-bot feedback loops

The problem

AI coding agents stalled on real production work because they could not read CI output, review-bot comments, or test-runner stack traces — so engineers had to manually relay that automated feedback back to the agents each afternoon.

First attempt

Standard isolated-environment agents failed on complex services with multiple client factories; the workaround of putting a human in the loop to relay CI and bot output was expensive and did not scale.

Workflow diagram · grounded in source
1
Task received via Slack or scheduler
trigger
“Tasks come in from Slack, Linear, GitHub, or a cron job.”
2
Orchestrator routes to agent pool
routing
“The orchestrator routes them to the agent pool. Each task gets its own RDE.”
3
Agent works and iterates on code
ai_action
“The agent works, hits failures, reads feedback, iterates, and puts up a PR.”
4
CI and review bots validate changes
validation
“Your CI system knows what failed and why. Your review bots flag style violations and security issues. Your test runner produces exact stack traces.”
5
Scripts relay feedback to agent
feedback_loop
“one to feed PR bot comments back to agents, and one to handle CI failures. They ran continuously in the background.”
6
Engineer reviews completed PR
human_review
“Your next interaction with it is a human review.”
Reported outcome

Closing the feedback loop with three Python scripts let migrations run from task submission to green PR without engineer intervention — no afternoon check-ins, no manual log copying.

Reported metrics
engineer-hours relaying CI outputMinimal engineer-hours spent relaying CI output
Time per simpler migrationabout 30 minutes each
Migrations completed without afternoon relay workdozens of migrations
Afternoon check-ins requiredNo afternoon check-ins
Reported stack
SlackLinearGitHubPython
Source
https://www.brex.com/journal/building-autonomous-agents-for-technical-tasks
Read source ↗

Frequently asked questions

What did this team achieve with this AI workflow?

Closing the feedback loop with three Python scripts let migrations run from task submission to green PR without engineer intervention — no afternoon check-ins, no manual log copying.

What tools did this team use?

Slack, Linear, GitHub, Python.

What results were reported?

engineer-hours relaying CI output: Minimal engineer-hours spent relaying CI output; Time per simpler migration: about 30 minutes each; Migrations completed without afternoon relay work: dozens of migrations; Afternoon check-ins required: No afternoon check-ins (source-reported, not independently verified).

What failed first in this deployment?

Standard isolated-environment agents failed on complex services with multiple client factories; the workaround of putting a human in the loop to relay CI and bot output was expensive and did not scale.

How is this workflow AI workflow structured?

Task received via Slack or scheduler → Orchestrator routes to agent pool → Agent works and iterates on code → CI and review bots validate changes → Scripts relay feedback to agent → Engineer reviews completed PR.