$ npm install @antv/ava
AVA ( 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.
๐ Unified data accessConnect files and databases through one interface. Data sources โ |
๐ Grounded answersInspect the queries and results behind each answer. Trusted analysis โ |
๐ Smart visualizationGet charts guided by your question and data. Visualization โ |
๐ป Local executionChoose where analysis runs and which model endpoint it uses. Execution engines โ |
๐ฏ Published benchmarksCheck accuracy against reference answers under published test conditions. Benchmarks โ |
๐ค Agent integrationYour agent reasons; AVA executes the data workflow. Agent integration โ |
Install AVA 4.0 with Node.js 22.13+:
npm install @antv/ava@4
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>',
},
});
await ava.source({ type: 'csv-file', options: { path: './sales.csv' } });
[!NOTE] Data preview
First 3 of 240 rows, selected columns:
order_date product sales 2025-01-01 Monitor 224.10 2025-01-02 Office Chair 680.20 2025-01-04 Monitor 2,191.20
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
Context Details Structure data: 12 columnsQuality 240 rows; 1 missing regionand 1 missingquantitySemantics salesis after discounts; monthly comparisons useorder_date
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?
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:
Product January sales February sales Change Laptop 19,688.10 3,596.00 โ16,092.10 Standing Desk 9,655.80 5,546.10 โ4,109.70 Monitor 6,536.25 4,731.00 โ1,805.25
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
![]()
Powered by GPT-Vis.
CSV |
JSON |
Parquet |
Excel |
Text |
Feishu Bitable |
Tencent Docs |
SQLite |
MySQL |
PostgreSQL |
SQL Server |
MongoDB |
Supabase |
ClickHouse |
[!TIP] Missing a data source? ๐ก๐ ๏ธ
We evaluate AVA on established benchmarks to measure the accuracy and efficiency of its data analysis.
Evaluation setup and reports โ
The agent and CLI workflows run on Node.js 22.13+ on macOS or Linux.
Ask your AI agent:
Install the AVA skill with `npx skills add antvis/AVA`, then follow its setup instructions.
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.
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.
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.
MIT
© 2010 - cnpmjs.org x YWFE | Home | YWFE