--:--
--
My Crafts Space
3 months

Aletheia

A multi-agent research system that drafts, critiques and revises its own output before you ever read it.

hero shot — drop a product image here
Timeline3 months
StackPythonLangGraphOpenAIpgvectorFastAPI
Overview

Most LLM pipelines answer once and stop. Aletheia routes a question through a planner, a set of researcher agents, and a dedicated critic that sends weak claims back for another pass — so the answer you see has already survived a round of internal review.

The challenge

Single-pass generation is confident and often wrong. The failure mode isn’t lack of knowledge — it’s the absence of anyone checking the first draft.

The goal was a loop that measurably reduces unsupported claims without ballooning cost or latency past a usable budget.

Approach

A planner decomposes the query; researcher agents gather evidence into a shared vector store; a critic scores each claim for support and triggers revision when confidence is low.

The loop is capped at three passes. In evaluation, unsupported claims dropped sharply after the first critique with diminishing returns after.

What I built

01

Planner → researchers

A query is decomposed into sub-questions dispatched to parallel agents.

02

Shared evidence store

Findings land in pgvector so agents cite each other, not just the model.

03

Self-critique loop

A critic scores claim support and returns weak ones for another pass.

04

Bounded cost

Capped at three passes; a budget guard halts runaway loops.

Under the hood

a slice of the core logic
graph.pypy
1graph = StateGraph(Research)2graph.add_node("plan", planner)3graph.add_node("research", researchers)4graph.add_node("critique", critic)5 6# revise only while claims are weak and budget remains7graph.add_conditional_edges("critique", lambda s:8    "research" if s.weak_claims and s.passes < 3 else "done")9 10app = graph.compile()

Screens

agent graph — planner, researchers, critic
claim ledger — support scores per pass

Results

−41%unsupported claims
3max revision passes
~9smedian answer time

Links & resources