Autonomous AI Agents for Engineering Tasks with Closed-Loop Feedback Systems

brex · Tech · 2026 · source Agentic: yes · promotional bias: low · source-backed · extracted with prompt 0.5.4 (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: Autonomous engineering task delegation

Brex needed AI coding agents to complete real production engineering tasks such as monorepo gRPC migrations without engineers manually relaying CI failures, review-bot comments, and test logs back into chat sessions.

Constraints:

Architecture

Brex built a closed-loop delegation platform for engineering agents. Tasks arrive from Slack, Linear, GitHub, or cron and are routed by an orchestrator to an agent pool. Each task gets its own remote developer environment and full engineering toolchain. Continuous scripts forward Slack requests, PR bot comments, and CI failures back to agents, allowing them to read feedback, iterate, and create a green PR for human review rather than stopping when automated systems report failures.

Diagram confidence: explicit (topology described by the source).

flowchart LR
  task-triggers[Task triggers] --> orchestrator[Orchestrator]
  orchestrator --> agent-pool[Agent pool]
  orchestrator --> remote-developer-environment[Remote developer environment]
  agent-pool --> remote-developer-environment
  remote-developer-environment --> ci-system[CI system]
  remote-developer-environment --> test-runner[Test runner]
  agent-pool --> github-pull-request[GitHub pull request]
  ci-system --> feedback-bridge-scripts[Feedback bridge scripts]
  review-bots[Review bots] --> feedback-bridge-scripts
  test-runner --> feedback-bridge-scripts
  feedback-bridge-scripts --> agent-pool
  github-pull-request --> human-reviewer[Human reviewer]
Drag to pan · scroll or use +/− to zoom · reconstructed from the source's described component topology

Components

Component Role Interacts with
Task triggers Accept work from Slack, Linear, GitHub, or scheduled jobs. Orchestrator
Orchestrator Routes incoming tasks to agents and provisions the execution setup. Task triggers, Agent pool, Remote developer environment
Agent pool Provides AI coding agents that work on assigned engineering tasks. Orchestrator, Remote developer environment, Feedback bridge scripts, GitHub pull request
Remote developer environment Isolated workspace with repository and full toolchain for one task. Orchestrator, Agent pool, CI system, Test runner
Feedback bridge scripts Continuously forward Slack task requests, PR bot comments, and CI failures back to agents. Agent pool, CI system, Review bots, GitHub pull request
CI system Runs validation and returns failures and logs. Remote developer environment, Feedback bridge scripts, GitHub pull request
Review bots Flag style, security, and code review issues on PRs. Feedback bridge scripts, GitHub pull request
Test runner Produces exact stack traces and validation output for the agent. Remote developer environment, Feedback bridge scripts
GitHub pull request Holds the agent's final changes for human review. Agent pool, CI system, Review bots, Human reviewer
Human reviewer Reviews the completed PR rather than relaying machine feedback during execution. GitHub pull request

Data flow

A human sends a Slack message or another system creates a task. The orchestrator routes the task to an agent and provisions a dedicated remote development environment. The agent edits code, opens or updates a PR, reads CI failures and review-bot comments through feedback loops, applies fixes, reruns validation, and leaves a reviewable PR for the human owner.

3 supporting quotes
“You send a Slack message describing a bug or a refactor. The system spins up a dedicated environment, assigns an agent, and gives it the full toolchain.”article, stated
“Tasks come in from Slack, Linear, GitHub, or a cron job. The orchestrator routes them to the agent pool. Each task gets its own RDE.”article, stated
“The agent works, hits failures, reads feedback, iterates, and puts up a PR. We come back to something reviewable.”article, stated

Why this architecture

Brex found that agent reliability on real work was mainly an infrastructure and connectivity problem. Agents already had enough capability for well-scoped migrations, but they could not read CI, review bots, or test feedback. Giving each agent an isolated environment, full toolchain, and automated feedback loops let agents keep iterating without engineers acting as messengers.

3 supporting quotes
“The issue is connectivity: * Your CI system knows what failed and why. * Your review bots flag style violations and security issues.”article, stated
“All of that information exists. It was built for engineers. But agents can't reach it, so it never gets back to them.”article, stated
“The gap between "AI agents can do this" and "AI agents are doing this reliably" is mostly an infrastructure problem.”article, stated

Models used: AI coding agents

Scale

Alternatives considered (roads not taken)

Human relays CI and review feedback to agents

Rejected because: It turned engineers into messengers for information already produced by automated systems.

“The standard workaround is a human in the loop, not to make decisions, but to relay messages. **That's an expensive solution to a plumbing problem.”article, stated
“We turned engineers into messengers. All the information the agents needed already existed. Bots comment on PRs.”article, stated

Run agents in isolated sandboxes without production feedback

Rejected because: Agents hit CI/review feedback walls or continue without critical validation information.

“Then you put them on real production work, such as a live monorepo, real CI, and real review bots, and a specific failure mode emerges”article, stated
“Then you put them on real production work, such as a live monorepo, real CI, and real review bots, and a specific failure mode emerges: the agent finishes its changes, hits a wall of automated feedback it can't read, and stops.”article, stated

Assign agents broad, underspecified engineering work

Rejected because: Brex says the pattern is for tedious, well-defined tasks and requires tight scope.

“Scope the work tightly. This is for tasks that are tedious, well-defined, and common enough that nobody wants to own them manually.”article, stated
“Scope the work tightly. This is for tasks that are tedious, well-defined, and common enough that nobody wants to own them manually.”article, stated

Patterns

tool-use-orchestration (agentic)

Agents receive a dedicated environment, full toolchain, CI feedback, review bot comments, tests, and PR workflow access.

“The system spins up a dedicated environment, assigns an agent, and gives it the full toolchain.”article, stated
“The agent reads its own CI failures and applies suggestions by code review bots”article, stated

async-message-orchestration (agentic)

Tasks enter from multiple trigger systems and are routed to agents that work independently until a PR is ready.

“Tasks come in from Slack, Linear, GitHub, or a cron job. The orchestrator routes them to the agent pool.”article, stated

eval-driven-development (quality)

Agents iterate on exact CI failures, test runner stack traces, and review-bot comments rather than relying on final human relay.

“CI returns detailed logs. Test runners tell you exactly what broke and where.”article, stated
“The agent works, hits failures, reads feedback, iterates, and puts up a PR.”article, stated

human-in-the-loop-gate (governance)

Humans review the final PR, while automated systems and agents handle intermediate feedback loops.

“Your next interaction with it is a human review.”article, stated
“We come back to something reviewable.”article, stated

guardrails-io-filtering (governance)

Brex constrains agents to tightly scoped tasks and attributes reviewed work to an actual human.

“Scope the work tightly.”article, stated
“agent work is put in front of a human to review it needs to be attributed back to an actual human and not just a bot.”article, stated

Tradeoffs

Close the feedback loop instead of adding human relay work

Chose scripts that feed CI and PR bot outputs back to agents over engineers copying logs and comments into chat windows.

Rationale: The information was already generated by engineering systems, so the missing piece was plumbing rather than human judgment.

“The standard workaround is a human in the loop, not to make decisions, but to relay messages. That's an expensive solution to a plumbing problem.”article, stated
“All the information the agents needed already existed. Bots comment on PRs. CI returns detailed logs.”article, stated

Use isolated remote developer environments per task

Chose one RDE per delegated task over shared or unmanaged agent workspaces.

Rationale: Isolation enables independent iteration and supports scalable parallel execution.

“Each task gets its own RDE.”article, stated
“each agent runs in its own environment and manages its own feedback loop.”article, stated

Delegate well-scoped repetitive tasks first

Chose tedious, well-defined migrations and similar work over broad, ambiguous production engineering tasks.

Rationale: Agents performed reliably when the task pattern was clear and the platform supplied validation feedback.

“The work was repetitive enough that you could describe the pattern once and let the agent run.”article, stated
“This is for tasks that are tedious, well-defined, and common enough that nobody wants to own them manually.”article, stated

Gotchas (what bit them)

Agents stop when they cannot read automated feedback.

Root cause: CI, review bots, and test runners produce the necessary diagnostics, but isolated agents cannot access them.

Resolution: Brex built scripts and feedback loops that forward PR comments and CI failures back to agents.

“the agent finishes its changes, hits a wall of automated feedback it can't read, and stops.”article, stated
“one to feed PR bot comments back to agents, and one to handle CI failures.”article, stated

Humans became message relays instead of decision makers.

Root cause: The agent platform lacked plumbing to consume existing engineering-system outputs.

Resolution: Closed feedback loops let agents read failures and continue until the PR is ready for human review.

“Every afternoon we'd come back and manually relay whatever automated systems had said back to the agents.”article, stated
“The agents were doing what agents are supposed to do: running until they're done.”article, stated

Parallel agent runs introduce systems-design complexity.

Root cause: Each independently iterating agent needs isolation and orchestration, especially at high parallelism.

Resolution: The platform gives each task its own remote developer environment and routes work through an orchestrator.

“Running 50 in parallel, each iterating independently, requires thinking carefully about orchestration and environment isolation.”article, stated
“each agent runs in its own environment and manages its own feedback loop.”article, stated

Evaluation

Brex evaluated the platform through repeated gRPC migrations, successful end-to-end runs without human relay, green PR outcomes, and lessons from scaling toward parallel agent execution.

Metrics: dozens of gRPC migrations · 100 to 200 lines of changes for simpler services · about 30 minutes per simpler one-shot migration · green PR by the end of the day · target consideration of 50 parallel agents

3 supporting quotes
“We ran dozens of gRPC migrations across our monorepo, and the process got better with each one.”article, stated
“100 to 200 lines of changes, one-shot, about 30 minutes each.”article, stated
“The first time a migration ran start to finish without either of us touching it was a confirmation”article, stated

Outcomes

The article reports dozens of migrations and discusses the design implications of running 50 agents in parallel, but does not disclose total merged PR count or failure rates.

3 supporting quotes
“Minimal engineer-hours spent relaying CI output. No one copying error logs into chat windows. No afternoon check-ins.”article, stated
“What we built is a general-purpose template for delegating engineering work to agents”article, stated
“The scope of what's delegable keeps expanding”article, stated