Skip to content
Charan Kumar Reddy
AI & AgentsDistributed Systems / SDEIn progress

Agent Orchestration System

Human-approved multi-agent research system on LangGraph, FastAPI and PostgreSQL

Research-report workflow where planner, researcher, writer and reviewer agents run on LangGraph behind human approval gates, with PostgreSQL-leased workers, OIDC auth and a React UI. Agents use deterministic fakes unless an LLM is configured.

Sign-in by invitation or access request; the free instance can take a minute to wake.

citations valid across harness runs (deterministic fake agents)
70/70
eval/results/2026-10-16-dev-validation-fake-16c073/summary.md
runs where the human approval gate held
30/30
eval/results/2026-10-16-dev-validation-fake-16c073/summary.md

The problem

Multi-agent LLM workflows can fabricate citations, fetch attacker-supplied URLs, overspend on model calls and let edited output slip past the person who approved it.

The approach

A LangGraph DAG runs planner, parallel researcher, writer and reviewer agents with two human approval gates bound to version digests; PostgreSQL leases, fencing tokens and checkpoints coordinate crash-safe workers without a message broker.

Architecture

  1. 01

    Brief and planner

    The planner turns a brief into a typed plan of research tasks under a JSON-schema contract; a person approves or edits the plan before any research runs.

  2. 02

    Parallel researchers

    A bounded pool of researcher agents searches (Tavily or an offline corpus), fetches through an SSRF-safe fetcher with a domain policy, and reserves budget before every model call.

  3. 03

    Writer

    Drafts the report so that every factual sentence cites evidence; citations are validated against this run's evidence only.

  4. 04

    Reviewer loop

    Deterministic checks plus the model flag unsupported claims, figures and gaps and request revisions, for at most two rounds.

  5. 05

    Human approval gates

    Plan and report approvals bind to a version and a content digest, so approving v2 never approves an edited v3, and the export records who approved which exact report.

  6. 06

    PostgreSQL coordination

    PostgreSQL 17 holds app data, jobs, worker leases and LangGraph checkpoints; workers use fenced writes, and a run waiting for a person holds no worker.

Key decisions

  • Uses PostgreSQL as the only coordination medium (leases, fencing tokens, checkpoints) instead of adding a message broker, trading peak queue throughput for one durable system to operate and reason about.
  • Binds each human approval to a version digest rather than a document id, so an edit after approval forces a new approval.
  • Reserves model budget before every call against a written spending ceiling, so a runaway agent loop fails closed instead of overspending.
  • Caps the reviewer at two revision rounds to bound latency and cost, accepting that some drafts ship with reviewer notes rather than looping indefinitely.
  • Ships deterministic fake agents as the default so the full system, CI and evaluation harness run with no API keys.

Results

  • Harness validation over 30 runs per system: 0/30 operational failures, 0/30 human-gate bypasses, 0/30 injected-URL fetches and 70/70 valid citations.
  • OIDC sign-in with PKCE, role-based workspaces (analyst, reviewer, admin) and server-sent progress events are implemented end to end.
Measured results and the files they come from
MetricValueSource
Citations valid in harness runs (multi-agent system, fake agents)70/70eval/results/2026-10-16-dev-validation-fake-16c073/summary.md
Runs with the human approval gate intact30/30eval/results/2026-10-16-dev-validation-fake-16c073/summary.md
Worker job lease / heartbeat30 s / 10 sbackend/app/config.py

How it is tested

  • Backend, frontend, end-to-end (Playwright) and accessibility (axe-core, WCAG 2.2 A/AA) suites run in CI.
  • CI builds the production image and smoke-tests every deployment topology.
  • An evaluation harness compares a multi-agent system with reviewer, a single-agent baseline and a pass-through reviewer on the same briefs.

Limits, stated plainly

  • The published evaluation numbers use fake agents and validate the harness, not model quality; live-model results are pending a budget and blind human scoring.
  • The production deployment and rollback rehearsals are written procedures that have not yet been run.

Stack

PythonFastAPILangGraphPostgreSQLSQLAlchemyAlembicOpenTelemetryReactTypeScript