@antv/ava

中文文档
4.0.0发布于 2026/11/04MITTypeScriptESM + CJS近 30 天下载 1.2万

A framework for AI-native Visual Analytics

原始使用文档
文档目录23 节
  1. ✨ Why AVA?
  2. 🔌 Unified data access
  3. 🔎 Grounded answers
  4. 📊 Smart visualization
  5. 💻 Local execution
  6. 🎯 Published benchmarks
  7. 🤖 Agent integration
  8. 🚀 Getting started
  9. 💻 Usage
  10. 1. Load
  11. 2. Explore
  12. 3. Suggest
  13. 4. Analyze
  14. 5. Visualize
  15. 🔌 Connect your data
  16. 🎯 Benchmarks
  17. 🧩 More ways to use AVA
  18. Use with an Agent
  19. Use from the CLI
  20. 📚 Resources
  21. 🤝🛠️ Contributing
  22. 📑 Papers
  23. ⚖️ License

AVA, AI-native Visual Analytics

AVA logo

Website Documentation AI Agent Try Sive GitHub llms

AVA (AVA examples Visual Analytics) is a technology framework designed for more convenient visual analytics. A stands for AI-native, Automated, and Augmented; VA stands for Visual Analytics.

[!NOTE] Think of AVA as PandasAI for JavaScript. 💬📊🤖

It brings natural-language data analysis and visualization to your apps and AI agents.

✨ Why AVA?

🔌 Unified data access

Connect files and databases through one interface.

Data sources →

🔎 Grounded answers

Inspect the queries and results behind each answer.

Trusted analysis →

📊 Smart visualization

Get charts guided by your question and data.

Visualization →

💻 Local execution

Choose where analysis runs and which model endpoint it uses.

Execution engines →

🎯 Published benchmarks

Check accuracy against reference answers under published test conditions.

Benchmarks →

🤖 Agent integration

Your agent reasons; AVA executes the data workflow.

Agent integration →

🚀 Getting started

Install AVA 4.0 with Node.js 22.13+:

npm install @antv/ava@4

💻 Usage

Download sales.csv and configure your model:

import { AVA } from '@antv/ava';

const ava = new AVA({
  llm: {
    model: '<your-model>',
    apiKey: '<your-api-key>',
    // baseURL: '<your-provider-api-url>',
  },
});

1. Load

await ava.source({ type: 'csv-file', options: { path: './sales.csv' } });

[!NOTE] Data preview

First 3 of 240 rows, selected columns:

order_dateproductsales
2025-01-01Monitor224.10
2025-01-02Office Chair680.20
2025-01-04Monitor2,191.20

2. Explore

Inspect the structure and data quality, then add business definitions:

const schema = await ava.schema();
const profile = await ava.profile({ metrics: ['row_count', 'null_count'] });
await ava.semantic(undefined, () => ({
  description: 'Use the sales column for amounts after discounts and order_date for monthly comparisons.',
}));

[!NOTE] Analysis context

ContextDetails
Structuredata: 12 columns
Quality240 rows; 1 missing region and 1 missing quantity
Semanticssales is after discounts; monthly comparisons use order_date

3. Suggest

const suggestions = await ava.suggest(3);

[!NOTE] Suggested questions (examples)

  • How did sales change from January to February 2025?
  • Which products contributed most to the sales decline?
  • How do sales and profit vary by region?

4. Analyze

const result = await ava.analyze(
  'Compare January and February 2025 sales by product. Show both months and the change, ordered by the largest decline.'
);

[!NOTE] Analysis result

Total sales fell 43.94%, led by a 16,092.10 decline in laptop sales.

First 3 of 9 products:

ProductJanuary salesFebruary salesChange
Laptop19,688.103,596.00−16,092.10
Standing Desk9,655.805,546.10−4,109.70
Monitor6,536.254,731.00−1,805.25

5. Visualize

const chart = await ava.visualize({
  query: 'Plot the sales change by product from January to February 2025 as a bar chart.',
  data: result.data,
});

[!NOTE] Chart preview

Sales change by product from January to February 2025, with decreases in red and increases in green.

Powered by GPT-Vis.

🔌 Connect your data

CSV
CSV
JSON
JSON
Parquet
Parquet
Excel
Excel
Text
Text
Feishu Bitable
Feishu Bitable
Tencent Docs
Tencent Docs
SQLite
SQLite
MySQL
MySQL
PostgreSQL
PostgreSQL
SQL Server
SQL Server
MongoDB
MongoDB
Supabase
Supabase
ClickHouse
ClickHouse

[!TIP] Missing a data source? 💡🛠️

💬 Open an issue · 🛠️ Submit a pull request

🎯 Benchmarks

We evaluate AVA on established benchmarks to measure the accuracy and efficiency of its data analysis.

DataBench and Spider2-Lite evaluation results comparing raw data, schema and profile, and semantic context.

Evaluation setup and reports →

🧩 More ways to use AVA

The agent and CLI workflows run on Node.js 22.13+ on macOS or Linux.

Use with an Agent

Ask your AI agent:

Install the AVA skill with `npx skills add antvis/AVA`, then follow its setup instructions.

Agent setup guide →

Use from the CLI

Load and analyze data from your terminal:

ava source ./sales.csv
ava analyze '<dataset-id>' 'Compare January and February 2025 sales by product.'

See the CLI guide for setup and commands.

📚 Resources

🤝🛠️ Contributing

Contributions are welcome. Include tests, examples, and documentation with new features.

Run npm test to test your changes. For model-backed tests, copy .env.example to .env and add your model settings.

📑 Papers

VizLinter - Chen, Q., Sun, F., Xu, X., Chen, Z., Wang, J. and Cao, N., 2021. VizLinter: A Linter and Fixer Framework for Data Visualization. IEEE transactions on visualization and computer graphics, 28(1), pp.206-216.

《数据可视化设计的类型学实践》(Exploring the Typology of Visualization Design) - 蓝星宇, 王嘉喆. 数据可视化设计的类型学实践, 《美术大观》, 2022(3), 149-152.

⚖️ License

MIT

版本与发布记录

@antv/ava 共发布 58 个版本,首次发布于 2022/11/20;过去 12 个月发布了 15 个版本。

版本发布日期距今
4.0.0latest2026/11/042 天前
4.0.0-beta.5beta2026/11/023 天前
4.0.0-beta.42026/10/307 天前
4.0.0-beta.32026/10/2610 天前
4.0.0-beta.22026/10/2611 天前
4.0.0-alpha.6alpha2026/10/1917 天前

关于 @antv/ava 的常见问题

@antv/ava 是什么?

A framework for AI-native Visual Analytics

如何安装 @antv/ava?

在项目目录运行 npm install @antv/ava,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 ava,可以用 npx ava 直接运行。

@antv/ava 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@antv/ava 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@antv/ava 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=22.13.0。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@antv/ava 可以商用吗?

@antv/ava 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@antv/ava 的下载量有多少?

根据 npm 官方下载统计,@antv/ava 在 2026/10/06 – 2026/11/04 这 30 天内被下载 11,809 次,日均约 394 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@antv/ava 还在维护吗?

最新版本 4.0.0 发布于 2026/11/04(2 天前);至今共发布 58 个版本,其中过去 12 个月发布了 15 个;首次发布于 2022/11/20。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。