←All projects

Agents/Case StudyShipped/ 2026

Cortex Agents

Multi-agent research assistant.

TypeScriptAgentsToolsEval
/cortex-agents
cortex agents / onlineTypeScript · Agents · Tools · Eval

Problem and solution

01/Problem

Single-agent research pipelines either plateau on quality or burn budget re-running the same searches. We needed something that could plan a brief, dispatch focused workers, and consolidate without supervision.

02/Solution

Cortex splits the work into three roles — a planner that decomposes the brief, a researcher pool that performs focused searches in parallel, and a writer that consolidates with citations. A small judge model gates each step, so bad outputs are caught before they cascade.

03/How it works

The system, end to end.

  1. 01next →

    Brief

    User prompt + constraints.

  2. 02next →

    Plan

    Planner decomposes into sub-questions.

  3. 03next →

    Dispatch

    Researchers search in parallel.

  4. 04next →

    Judge

    Per-result quality gate.

  5. 05loop

    Consolidate

    Writer produces the cited brief.

04/Architecture

Components and data flow.

How the moving parts fit together. Solid arrows are synchronous calls; dashed arrows are queued or batched.

  1. 01

    Client UI

  2. 02

    Planner agent

  3. 03

    Tool registry

  4. 04

    Researcher pool (parallel)

  5. 05

    Judge model

  6. 06

    Writer agent

  7. 07

    Eval pipeline

  8. 08

    Persistent memory

↓ flow continues

05/Technology

The stack.

AI / ML
GPT-class plannersEmbedding-based dedupLightweight judge model
Frontend
Next.jsMDX renderer
Backend
TypeScriptNode.jstRPC
Database
PostgresRedisS3
Infrastructure
Fly.ioGitHub Actions
APIs
SerperExaOpenAIAnthropic

06/Engineering decisions

What we picked, and why.

  1. 01

    Planner / researcher / writer split

    Choice

    Three roles instead of one monolith

    Alternatives

    • Single ReAct loop
    • Tree-of-thought

    Why

    Roles let us swap models per task and gave clean evaluation boundaries.

  2. 02

    Per-step judge instead of end-only eval

    Choice

    Inline quality gate after each researcher run

    Alternatives

    • End-to-end eval only

    Why

    Caught hallucinations at the source. End-only eval let bad research pollute the writer.

07/Evaluation

What we measured.

  • 01

    98%

    Brief completion

  • 02

    88%

    Citation precision

  • 03

    $0.42

    Cost / brief

  • 04

    22s

    p95 latency

08/Challenges

What almost broke us.

  • 01

    Researcher loops

    What happened

    Workers kept re-querying.

    What we did

    Added a memory cache keyed on sub-question + tool.

  • 02

    Writer drift

    What happened

    Writer over-relied on early sources.

    What we did

    Forced it to read all researcher outputs before drafting.

09/Results

Briefs now match or beat junior-analyst drafts on internal rubrics 78% of the time.

10/Future improvements

  • ›Long-horizon planning with persistent scratchpads
  • ›Domain-specific tool packs
  • ›Eval-as-a-service integration

Have an interesting AI problem?

Let's build something.

If you're working on something that needs real AI engineering — not just a demo — let's talk.

© 2026
Motion-Y

Hello, I'm your Motion-Y Assistant. How can I help you today?