平台补上一层「确定性的数据分析」,补的是原来缺的那半:报告里站得住的数只来自 SQL 的格、口径卡的标量式和运行输入,而写作者被要求「说清变化和原因」,系统既不给原因从哪来、也不核对原因。本轮把「算什么」「怎么想」「怎么说」都做成可复算、可点开、可核对的东西。 算(五个算子,app/analysis) - 可比性检查:两份查询是否只差日期、窗口是否一样长、本期是否整期、星期构成是否相同;按 SQL 里的格式串认周号算法(SQLite %W / %U、MySQL %U / %u / %V / %v、to_char WW / IW),算不出真实起止就判「核对不了」,绝不判完整;口径卡的指标用到两份同形只差字面量的查询时自动做一次,结果挂在指标上,出具时不可比记缺口、有条件可比只标注。 - 变化拆解:可加按维度算贡献(各段之和与总数闭合,不闭合不给占比、不下集中判断)、比率拆出结构效应与各段自身效应(中点对称拆法,能识别辛普森悖论)、乘积按 LMDI 拆因子,逐层下钻(上一层那一段的值做闭合)。 - 波动基线:把本期放回过去 N 期的历史,用中位数与 MAD 判常规波动、超出、明显超出;本期不完整、缺期、历史不够都照实说算不了。 - 趋势:Theil–Sen 斜率 + Mann–Kendall(小样本精确分布、并列修正、连续性校正),末尾连续同向期数。 - 差异检验:Wilson / Newcombe 区间、合并比例 z 检验与 Fisher 精确、Welch t、Holm 多重比较校正、去掉极值的敏感性。 - 统计全是纯 Python(不加依赖);数与判定语规范化、同输入逐字节相同;每份结论记方法版本、实际阈值、输入快照、现查的表范围、判定标准,按内容哈希寻址,复算逐字段相同才算核对通过。 想(分析型问数) - 五个 agent 分析工具(analysis_decompose / baseline / trend / differ / comparable),参数只有「算什么」、没有阈值;绑了就注入一套分析方法(先可比性和基线、再拆因子与结构、由粗到细拆维度、找到主要来源再下钻一层、写明假设、拆了不集中也是结论、不作因果断言、算不了照实说)。 - 问题意图词表判断「为什么 / 是否异常 / 趋势 / 差异」这类问题;助手按分析类问题的形状建图并自查是否绑了分析工具(只挡一轮)。 - 结论末尾由系统写「分析范围」:查了什么、排除了什么、没拆的是哪些候选维度(候选维度从数据目录算,目录没维护就照实说没维护)。 - 内置模板 ⑪「异动分析(可追溯)」;评测变体加「分析工具开 / 关」对照与预设。 核(分析说法核对) - 报告里的判断词(主要来自、集中在、拖累、分散、结构变化、异常、大幅、新高新低、正常波动、持续、趋势、显著高于、差异不大)必须挂对应的分析结论,而且判定、点名的段、方向要对得上;因果说法要有知识库原话或运行输入作依据,否则写成推测。 - 判定语由系统渲染,写作者只引用([[a:A1]]、[[a:A1.top_share]]、[[table:A1 …]]),不再自己下判断;分析结论里的占比、变化率按百分数、比率之差按百分点、有量纲的比率(客单价这类)照原值显示。 - 缺省「重写一次后标出」、不影响出具档位;受管级要求严格(重写后仍有就进出具缺口),出口独立复核。 - 修掉一个口子:引用模式下被引指标的输入追不到原始数据时,受管级记缺口降档,和证据面板的说法一致。 证据与界面 - 分析结论进证据台账编号 A1、A2…,按内容哈希寻址、随运行封存;出处链六步(判定 → 方法 → 计算 → 输入 → 复算 → 封存),网页证据面板、报告导出、可验证报告三处同一套;证据图多一种「派生自」的边。 - 分析卡:画布新增节点类型,模板里固定要做哪些分析、可写阈值覆盖、产出可接分支;分析卡里随数据变化的错误记成「算不了」不让卡失败。 - 前端:分析卡与分析项编辑器、设置「分析」一节(17 项)、问数据时间线的分析步骤、运行对比的分析卡一区、正文里判定语可点与说法违规标注、分析范围一段、出具横幅三项。 - 设置「偏好设置 → 分析」:阈值只来自这里的快照和分析卡上的覆盖,模型改不了。 评测 - 两种新期望:贡献(按维度的主要来源与方向)、判定(波动基线 / 趋势 / 差异检验 / 可比性),期望值由期望 SQL 的快照加同一套算子算出来,仍不许人填;评分沿用五种结论,评分规则第 3 版,提示词指纹包含分析方法与写作者的分析规则。 - 新建虚构库 retail_trends(26 周、埋了八个效应)与分析题集,现有零售库不动。 验收 - 后端全量 16026 通过;PostgreSQL 全量未跑(本轮没改表结构、没加迁移);tsc、check-copy、check-docs 通过;浏览器检查 14 项 5599 项通过,最后受影响的 5 项 2229 项重跑通过。 - 真实模型验收:隔离数据目录、虚构库,8 道分析题 × 分析工具开 / 关 × 每臂 3 次(48 次作答)。开:准确率 75.0%、可追溯准确率 58.3%;关:20.8%、0%;配对检验 p=0.031(开对关错 6 题、关对开错 0 题)。人工核 8 次作答的证据链、判定、说法,查出并修掉了:比率本身被套百分数(客单价 160.76 显示成 16,076.0%)、有量纲比率的效应值乘了一百、判定语整句搬进正文与「核对不了」当结论、因子正确主来源被判不符、目录没维护时的误导话术、评测估不出花费时按 0 预留却记成已计价。 - 遗留:可追溯匹配不核主口径一致性(会略微抬高准确率);未计价模型的金额上限不起作用(设计如此);「问数据」里有的模型会绕开题目要的口径(模型行为,评测分数会体现)。 升级说明 - 报告节点新增两个配置:分析说法核对(缺省「重写一次后标出」)、分析范围(缺省有分析结论时附上)。已发布的版本照常运行,只多一次重写和一处标注、不改档位;下次发布时按新的受管要求(严格)检查。 - 数据目录、数据库表结构、迁移都没有变化;老报告按记下的显示规则版本复核,结果不变。
English | Simplified Chinese
AgentLab
A visual agent-orchestration workbench: define workflows on a canvas, watch execution node by node at run time, and put verifiable constraints on what comes out. Templates fix the skeleton, and agents are free only at the joints they are authorized for; the system fills the numbers in a report from snapshots, and every number opens to its provenance. The user interface is currently available in Simplified Chinese only.
The Research Assistant template running on Mock: finished nodes get a check mark, and running nodes show elapsed time and streaming output. The track along the bottom is a live timeline; the right column shows the run steps, driven by the same event stream.
Why use it
- Numbers you can check: all arithmetic happens in SQL and in caliber cards (controlled metric sets), and the narrative layer has no right to create numbers. The report-writer node writes only citation markers, the system fills in the numbers from snapshots, and every number opens all the way to the cell in the query result it came from. Judgments such as "mainly from East" or "outside the usual fluctuation" are likewise computed by the system with fixed methods and written as verdict phrases, and the report only cites them.
- Constrained orchestration: the engine is compiled, so at run time the model can't change the graph structure; its freedom is confined to the inside of agent nodes and to branch decisions. Fully dynamic multi-agent collaboration stays in the exploration layer.
- Pinned, reproducible versions: formal runs accept only published immutable versions (pinned by graph hash). The complete evidence of every execution goes into a content-addressed artifact store and is sealed, and one click verifies that nothing was altered.
- Human control: approvals, joint sign-off, time limits, and Reject exits; nothing is ever approved automatically, and a process restart loses no state.
- Honest issuance: the issuance contract decides between three tiers, formal / degraded / withheld; when data is missing, the output is downgraded rather than forced through.
Main features
Orchestration and runs
- Canvas: 19 node types, drag and connect; live node highlighting, streaming output, and a timeline track at run time → Workflows
- Copilot: generate or rewrite a whole graph from one sentence; it looks up schemas on demand and checks its work before delivering → Copilot
- Human-in-the-loop: approvals, joint sign-off, time limits, Reject exits → Human nodes
- Agent guardrails: repeated calls, spending, and context each have a guard; the step count is only a backstop → Guardrails
- Runs and resuming: failed runs continue from the checkpoint; per-node duration, token usage, and cost → Runs
- Publishing and evidence gates: published and governed levels, gates G1–G5, pre-publish check and fixes → Publishing and versions
- Tools and the capability registry: built-in tools, custom tools, MCP, approval levels, registered endpoints → Tools
- Knowledge base, memory, and skills: hybrid retrieval, memory across runs, reusable methodology → Knowledge base
- Multi-model access: Anthropic, OpenAI, OpenAI-compatible services, and Mock → Model access
- Code sandbox: two isolation tiers, the OS sandbox (Seatbelt / bubblewrap) or microVM → Code sandbox
Data
- Ask Data: ask in natural language, and the system builds a graph, runs it, reviews it, and gives a conclusion → Ask Data
- Data sources and spreadsheet import: read-only access to business databases, Excel / CSV turned into tables you can query with SQL, cross-database merges → Data sources
- Data catalog: grain, business keys, valid-record conditions, code values, relationships; drafting, review, profiling, and a change log → Data catalog
- SQL checks: the catalog catches seven kinds of queries that compute wrong numbers → SQL checks
Evidence and issuance
- Clickable evidence: numbers, table and field names, and verbatim knowledge-base quotes all open to their provenance → Evidence and Issuance
- Analytical judgments: change decomposition, fluctuation baselines, trends, difference tests, and comparability checks are computed by the system, which also writes the verdict phrases; reports cite them, and judgment words are checked sentence by sentence → Analysis
- Three-tier issuance: caliber cards plus issuance contracts, checked by value or by citation → Issuance contracts
- Sealing and exports: one-click seal verification; self-contained report exports and verifiable reports → Exports
- Review suite: double-blind recomputation, adversarial review, approval inquiry, the what-if sandbox, run comparison → Review suite
Quality
- Regression evaluation: test suites, background evaluations, accuracy with intervals, comparisons and A/B, scheduled evaluations → Regression evaluation
- Caliber ledger: each number in an answer gets a caliber label, with issuance by caliber, reconciliation, and recall → Caliber ledger
Apps and integration
- Apps: entry forms, views, tasks, and actions derived from a published version → Apps
- Writing to external systems: confirmation cards, idempotency keys, no automatic resend when the result is unknown → Write to external systems
- External integration: inbound hooks, access keys, share links, embedding in portals → External integration
- Schedules, event triggers, and notifications → Schedules and notifications
Operations and security
- Identity and permissions: local accounts or OIDC, three roles plus app grants, masking boundaries → Identity, Permissions, and Security
- PostgreSQL and multiple processes: import, connection pools, PgBouncer, leases and takeover → PostgreSQL and Scaling
Quick start
You need conda (miniforge is enough), Node 20+, and pnpm; Docker isn't needed.
conda env create -f environment.yml # first time: create the agentlab environment and install dependencies
./scripts/dev.sh # after that: one command starts the frontend and backend
Open http://localhost:5273 . You can try everything without an API key: the built-in Mock provider runs the whole orchestration path end to end; to connect a real model, see Model access. The 11 built-in templates run as they are.
Login is off by default: anyone on the same network who can open the page can use every feature. Turn on login before multiple people use it; see Login modes. For more startup options, see Development.
Deployment
- Without Docker:
./scripts/prod.shbuilds the frontend and has the backend serve the pages too; one process by default, at http://127.0.0.1:8000 . - Offline environments: build a Docker offline bundle with
./scripts/package-docker.sh, copy it to a machine that has only Docker Engine, and run./deploy.sh.
See Deployment and deploy/README.md (written in Chinese). The app database defaults to SQLite with a single process; for multiple processes, switch to PostgreSQL (see PostgreSQL and Scaling). Read the Upgrade Notes before upgrading.
Documentation
| Document | What it covers |
|---|---|
| Using and building | |
| Ask Data and Copilot | What happens after you ask, output review, record retention, how Copilot builds graphs and looks things up |
| Workflows | The canvas, node types, passing data, human nodes and rejection, agent guardrails, subworkflows, publishing and gates, runs and resuming |
| Evidence and Issuance | Caliber cards, issuance contracts and tiers, citation markers, claim sentences, no data in the queried range, sealing and verification, report exports and verifiable reports, the review suite |
| Analysis | The five analyses and their criteria, when an analysis can't be done, analysis tools for agents and analysis cards, how to cite, the analysis claim check, the analysis scope, settings and limits |
| Data Sources and Spreadsheet Import | Connecting databases, read-only guarantees, uploading spreadsheets and recipes, accumulating by period, cross-database merges, masked columns |
| Data Catalog | What the catalog records, drafting and review, export and import, data profiling, SQL checks, introspection scope for large databases, schema and value changes |
| Tools, MCP, and the Capability Registry | Kinds of tools, approval levels, capability governance, limits on write capabilities, registered endpoints, network rules |
| Apps | Creating apps, views and stamps, processes and tasks, writing to external systems, form submissions, personal apps, external integration |
| Evaluation and the Caliber Ledger | Test suites and evaluation results, caliber labels per number, issuance by caliber, reconciliation, distilling, recall |
| Schedules, Event Triggers, and Notifications | Schedules, event triggers, notification channels and email, subscribable events |
| Deployment and operations | |
| Deployment | prod.sh, the Docker offline bundle, the data directory, backups, upgrades |
| Configuration | Model access, the public URL, environment variables, UI settings, the sandbox backend and microVM |
| PostgreSQL and Scaling | Switching databases, importing, connection pools, PgBouncer, leases and takeover across processes, multiple machines, upgrades |
| Identity, Permissions, and Security | Login modes, roles and the permission table, masking boundaries, audit, the code sandbox, security boundaries |
| Upgrade Notes | How each update affects users and operators, and what to do when upgrading |
| Development | |
| Architecture and Design Decisions | The overall architecture, constrained dynamic orchestration, and the reasons behind key design decisions |
| Development | Development environment, directory layout, dependencies and the lock file, tests, frontend checks, documentation checks |
| FAQ | What to do about common errors and symptoms |
Development and testing
Before running backend tests, remove model keys from the environment; otherwise the tests might really call the API:
cd backend && env -u ANTHROPIC_API_KEY -u ANTHROPIC_BASE_URL -u ANTHROPIC_AUTH_TOKEN -u OPENAI_API_KEY \
python -m pytest -n auto
cd frontend && npx tsc -b
node scripts/check-all.mjs # frontend checks; start ./scripts/dev.sh first
For tests on PostgreSQL, the 43 frontend checks, and the documentation checks, see Development.
License
This project is source-available and is licensed under the PolyForm Noncommercial License 1.0.0.
Noncommercial Use
You may use, study, modify, experiment with, and develop upon this software for purposes permitted under the PolyForm Noncommercial License 1.0.0.
Typical permitted noncommercial uses include:
- personal research;
- learning and education;
- experimentation;
- evaluation and testing;
- hobby projects;
- noncommercial software development.
See the LICENSE file for the applicable license terms.
Commercial Use
Commercial use is not permitted without prior written authorization from Yilun JIANG.
If you intend to use this software in a commercial product, commercial service, SaaS offering, customer project, commercial deployment, or other commercial context, you must obtain a separate commercial license before doing so.
For commercial licensing, see COMMERCIAL-LICENSE.md or contact:
Yilun JIANG me@thearchyhelios.com
Copyright
Copyright (c) 2026 Yilun JIANG.
All rights reserved except as expressly granted under the applicable license.
