DEV Community

Cover image for Orchestrating a Feature Build Across Specialized AI Agents with Human Approval Gates
Leego
Leego

Posted on

Orchestrating a Feature Build Across Specialized AI Agents with Human Approval Gates

When a feature spans backend logic, frontend integration, and test coverage, the natural instinct is to hand the whole spec to a single model and hope for coherence. That approach works for isolated tasks, but it obscures a practical reality: different models have different strengths, and a single context window forces compromises. A more deliberate pattern is to assign each concern to a specialized agent, keep them in a shared session so they see each other's output, and insert human approval at the boundaries where assumptions turn into commitments.

This is the workflow VIBA enables. You spin up a session, invite ChatGPT, Claude, Gemini, or other models, give each a role, and step through the work with checkpoints you control. Cost per agent is visible throughout. The platform also provides UI testing, repo testing, beta testing, and ranked repair reports, but the core loop is straightforward: draft, review, approve, continue.

The Scenario: Adding a Webhook Endpoint with Retry Logic

Imagine a team needs to add a webhook receiver that validates signatures, persists events, and retries failed deliveries with exponential backoff. The work naturally splits:

  • Agent A (Architect/Backend): Designs the endpoint contract, signature verification, and data model.
  • Agent B (Reliability Engineer): Implements the retry queue, backoff strategy, and idempotency keys.
  • Agent C (Frontend/Integration): Builds the dashboard widget that shows delivery status and lets developers replay failures.
  • Agent D (QA/Reviewer): Writes integration tests, contracts, and a ranked repair report for any failures.

Instead of prompting one model to do all four, you assign each to a dedicated agent in the same session. They share context — Agent B sees Agent A's schema, Agent C sees both, Agent D sees everything — but each prompt is scoped to a single responsibility.

Step 1: Define Roles and Share a Contract

Start by creating the session and setting roles. In VIBA's configuration, you might declare:

session: webhook-retry-feature
agents:
  - name: architect
    model: claude-3-opus
    role: "Design REST endpoint, signature verification, PostgreSQL schema. Output OpenAPI fragment and SQL."
  - name: reliability
    model: gpt-4o
    role: "Implement retry queue with exponential backoff, idempotency keys, dead-letter handling. Use the architect's schema."
  - name: integration
    model: gemini-1.5-pro
    role: "Build React dashboard component: list deliveries, show status, replay button. Consume architect's API contract."
  - name: qa
    model: claude-3-sonnet
    role: "Write integration tests for endpoint, queue, and UI. Produce ranked repair report for failures."
Enter fullscreen mode Exit fullscreen mode

Each agent receives the same session history. When the architect emits an OpenAPI fragment, the reliability engineer and integration agent both see it immediately — no copy-paste, no drift.

Step 2: Human Approval at the Contract Boundary

The first approval gate arrives when the architect finishes the endpoint contract and schema. This is the moment where a wrong assumption — say, using a header name that conflicts with existing middleware — would cascade into every downstream agent.

You review the OpenAPI fragment and SQL in the session view. If the signature header is X-Webhook-Signature but your platform already uses X-Signature for another provider, you catch it here. You can edit the artifact directly in the UI, add a comment, and approve. The approval is recorded; the session continues with the corrected contract visible to all agents.

This step is where multi-agent AI stops feeling like parallel chat threads and starts feeling like a coordinated workflow. The human isn't reviewing code line-by-line; they're reviewing decisions at the seams.

Step 3: Parallel Execution with Shared Context

With the contract approved, the reliability and integration agents run in parallel. The reliability engineer writes the queue worker, referencing the exact table names and column types from the approved schema. The integration agent builds the dashboard component against the exact OpenAPI paths and response shapes.

Because they're in the same session, each can ask clarifying questions of the other. The integration agent might ask: "Should the replay endpoint be POST /webhooks/{id}/replay or PATCH /webhooks/{id} with a replay: true body?" The reliability engineer answers in the session log. The QA agent sees both and writes tests that match the agreed convention.

Cost per agent accumulates visibly. You might notice the reliability engineer's model is using more tokens because the backoff logic required a few iterations. That visibility lets you decide whether to switch models for the next task or tighten the prompt.

Step 4: QA Review and Ranked Repair

The QA agent runs last. It executes the integration tests against a temporary environment (VIBA's repo testing spins up a preview deployment) and produces a ranked repair report: failures sorted by severity, frequency, and estimated fix effort.

You review the report. If the top item is a flaky test caused by a race condition in the queue, you can assign a follow-up task to the reliability agent — still in the same session, still with full context. The loop closes without context switching.

Why This Beats a Single Long Prompt

A single-prompt approach forces one model to hold the entire feature in context: schema, queue logic, UI components, test strategy. Even with large context windows, the model must constantly switch mental models. Specialized agents avoid that cognitive load. Each prompt is smaller, more focused, and tuned to a model's strengths — Claude for careful schema design, GPT-4o for algorithmic queue logic, Gemini for UI component composition.

The human approval gates are the critical differentiator. They transform the workflow from "generate and hope" to "generate, verify, commit." You approve the contract before implementation begins. You approve the repair report before merging. The cost of coordination is a few minutes of review; the cost of a wrong assumption caught late is a production incident.

LLM Comparison in Practice

Running multiple models side by side also surfaces practical differences. You might find that one model consistently produces more idiomatic SQL, another writes cleaner React hooks, a third excels at test case generation. Over time, you build a mental map of which model to assign to which role — not from benchmarks, but from your own session history. VIBA makes that comparison explicit by keeping each agent's output attributable and costed.

Getting Started

The pattern scales down to solo work and up to small teams. A single developer can run the architect, reliability, and QA roles themselves, using different models for each, and still benefit from the approval gates. A team can assign each role to a different person, with the session as the shared artifact.

To try this workflow with your own feature, create a session at https://www.viba.guru and define your first set of roles. Start with a contract boundary you'd want to review before implementation — an API schema, a data model, a security policy. Let the agents do the drafting. You handle the decisions.

See VIBA: https://www.viba.guru

Top comments (1)

Collapse
 
hon6 profile image
hon6 •

Putting the human approval at the boundaries where assumptions turn into commitments, rather than after every step, is the right place for the checkpoints, and the webhook retry split between agents makes it concrete. I work on a related problem from the other side: agents such as Claude Code and Codex keep running on my computer and I use an open-source tool, Kiteline (GitHub hon6/kiteline), to see which one is waiting and approve from my phone.