01 · Schema Agent
Knowledge Construction
knowledge graph · FK topology · vector index · M-Schema
active
Stage 1
DB Introspect
DDL · FK · cardinality
Stage 2
Knowledge Graph
nodes · edges · layers
Stage 3
FK Topology
Merkle · 3-pass detect
Stage 4
Vector Index
M-Schema · NL→SQL
LangGraph
SQLAlchemy 2.0
SQLGlot
Qdrant
fastembed
DuckDB
Query Orchestration
02 · AgentSQL Orchestration
Query Pipeline
LangGraph StateGraph · self-correcting · CHESS + ReFoRCE
Stage 1
Schema Linker
CHESS LSH · RAG
Stage 2
SQL Generator
3 candidates · parallel
Stage 3
Self-Corrector
ReFoRCE · 3-stage loop
Output
Result
DataFrame · NL · Chart
LangGraph
LangChain
LiteLLM
OpenTelemetry
FastAPI
Specialist Agents
03 · Specialist Agents
Cross-Source Synthesis
decompose · synthesize · respond · learn
Agent
DecomposeAgent
cross-source split · DAG planner
Agent
SynthesisAgent
DuckDB JOIN · in-memory merge
Agent
ResponseGenerator
NL summary · chart · follow-ups
Agent
LearningLoop
feedback → training pairs
DuckDB
LangGraph
LiteLLM
Qdrant
Conversation Lineage 4 turns
Next query will appear here…
Turn 4 running 0.0s
"now break it down by age group — which bracket drives the biggest gap?"
Schema
Memory
Plan
Write
Writing SQL candidates…
Turn 3 done 21.4s
"tell me how does Indonesia & SG differ from performance of employment vs non-employment"
Schema
Memory
Plan
Write ×3
Run ×2
Join
Answer
630 rows
966 tok
cross-source
Turn 2 done 8.2s
"what countries did you use for the rest of ASEAN?"
Schema
Memory
Plan
Write ×2
Run
Answer
12 rows
410 tok
conversational
Turn 1 done 11.7s
"unemployment rate by ASEAN country in 2023"
Schema
Memory
Plan
Write ×3
Run
Answer
284 rows
821 tok
single-source