AnalystAI
Seven specialised agents that take a spreadsheet and a plain-English question to a boardroom answer.
- 7
- Specialised agents in the pipelinemeasured in repo
- E2B sandbox
- Generated code isolationmeasured in repo
- CSV · Excel · SQL · Sheets · REST
- Supported sourcesmeasured in repo
The problem
“Ask your data a question” demos usually collapse the moment the question is real, because one model is asked to do six different jobs at once — understand intent, infer schema, clean data, write code, choose a chart, and summarise. Each of those failing silently corrupts everything downstream. The fix is not a better prompt. It is separating the jobs so each one can be checked.
Architecture
Seven agents in a LangGraph state machine: intake turns the question into a structured plan, ingestion loads data and infers schema, cleaning handles nulls and type coercion, analysis writes and runs Python, visualisation emits a deterministic chart config, insight synthesises the summary, and a senior-expert agent reviews the result before it is shown. Generated Python executes in an E2B sandbox — never in the API process — because the system runs model-written code by design. Model routing is deliberate: Llama 3.3-70B on Groq for fast schema inference, Claude Sonnet for reasoning.
What broke
Seven sequential agents means seven chances to fail and a long critical path — the full pipeline is slow enough that multi-turn drill-downs had to be added specifically so follow-up questions do not re-run everything. The senior-expert review agent is also an LLM judging an LLM, which catches obvious errors and provides no guarantee about subtle ones. Rate limiting sits at 30 requests per minute and uploads cap at 50MB, both of which are real ceilings rather than tuned numbers.
Results
A self-hosted alternative to sending business data to a third-party analytics tool. Handles CSV, Excel, SQL databases, Google Sheets and REST APIs, runs statistical analysis, trend and anomaly detection and hypothesis testing, and ships as a Docker Compose stack with a Next.js frontend and pinnable dashboard.