Orchestrator

Plans & dispatches

The top-level reasoner. Reads the user's question, decides which specialists own which steps, runs the doom-loop guard, and routes the critic-revision loop.

On every /q requeston-demand

What this agent actually does, step by step.

  1. 01

    Receives the plain-English question via POST /api/agent

  2. 02

    Calls Codex once for reasoning + once for the JSON-schema-validated plan

  3. 03

    Validates the plan with two post-validators (scope check + plan-shape check)

  4. 04

    Dispatches each step to the right tool or specialist via deterministic routing

  5. 05

    On step failure or doom-loop pattern, re-prompts the planner with the failure envelope

  6. 06

    Hands the final result set to the synthesizer + critic

Inputs & outputs.

Inputs

  • · query: string
  • · dataset?: string (scope-anchor)
  • · demo?: boolean
  • · fallback?: boolean

Outputs

  • · SSE event stream: reasoning → planning → executing → step_done → done
  • · Final ToolEnvelope with answer + citation + artifacts + token usage + duration

Where this agent lives in the codebase.

app/lib/agent.ts

reasonAndPlan / replan / synthesize / criticize

app/api/agent/route.ts

SSE endpoint + dispatch loop

app/lib/doomLoop.ts

loop detection guard

Last 12 runs that touched this agent.

auto-refresh 60s

  • 07:49 PM

    Top 5 outliers in crime reports this year render this to a Miro board

    14 events · fdj4-gpfu

    Replay →
  • 07:49 PM

    Show austin crash report data trend over the last 24 months by quarter render this to a Miro board

    26 events · y2wy-tgr5

    Replay →
  • 07:49 PM

    How does 311 volume in flood-prone zips compare to the last year? render this to a Miro board

    18 events · xwdj-i9he

    Replay →
  • 07:48 PM

    Top 10 state agencies by total 2024 expenditures render this to a Miro board

    13 events · 2zpi-yjjs

    Replay →
  • 07:48 PM

    How do food inspection failures this year compare to last year? render this to a Miro board

    11 events · ecmv-9xxi

    Replay →
  • 07:48 PM

    Where do permits and code violations both spike together this year by zip? render this to a Miro board

    20 events · 6wtj-zbtb

    Replay →
  • 08:26 PM

    Top 5 outliers in dallas police active calls this year

    18 events · 9fxf-t2tr

    Replay →
  • 08:26 PM

    Join dallas police active calls with code violations by zip for the same period

    24 events · 6wtj-zbtb

    Replay →
  • 08:25 PM

    Show dallas police active calls trend over the last 24 months by quarter

    23 events · 9fxf-t2tr

    Replay →
  • 08:25 PM

    Compare dallas police active calls between this zip and the next-most-active zip

    18 events · no citation

    Replay →
  • 08:24 PM

    Top 5 outliers in austin crash report data this year

    18 events · y2wy-tgr5

    Replay →
  • 08:24 PM

    Join austin crash report data with code violations by zip for the same period

    24 events · 6wtj-zbtb

    Replay →