Build G6Lite graphs with AI

Use the G6Lite Skill, local AI agents, and Sive to create, troubleshoot, and optimize graph visualizations

AI for graph visualization

Turn intent into a graph you can verify

The G6Lite Skill helps an AI agent identify data scale, layout, interaction, and browser boundaries before it generates an implementation through the current package-root API.

View the G6Lite Skill

Start in Sive

Two ways to use it

Use the Skill locally

Provide the GitHub skills/antv-g6lite-graph directory as a Skill source to a compatible agent, then invoke it explicitly:

Use $antv-g6lite-graph to build a force-directed dependency graph
with hover highlighting and node dragging.

You can also ask an agent to install it directly from GitHub:

Install the skill from
https://github.com/antvis/G6Lite/tree/master/skills/antv-g6lite-graph

The Skill keeps the agent focused on these constraints:

  • Import only from the @antv/g6-lite package root, never src/ or dist/ internals.
  • Use ESM and a real browser lifecycle with DOM, Canvas, and WebGL.
  • Generate only the node, edge, layout, Behavior, Combo, and extension capabilities G6Lite supports.
  • Distinguish G6Lite from G6 v5 instead of copying plugin, event, or element configuration.
  • For large graphs, examine layout, label density, incremental updates, DPR, GPU, and real devices.

Good agent tasks

TaskInclude in the prompt
Create a relationship graphData fields, node/edge count, layout, container size
Add interactionsSelection, drag, tooltip, highlight, brush, or lasso
Migrate from G6 v5List capability differences and unsupported needs before editing
Diagnose a blank canvasContainer size, endpoints, WebGL, lifecycle, and version
Optimize a large graphFirst render, layout, labels, state patches, memory, and devices
Create an extensionCategory, lifecycle, public ExtensionContext, and cleanup
  1. Clarify inputConfirm data, scale, coordinates, layout, interactions, and runtime.
  2. Render the minimumProve a visible, disposable graph through package-root APIs.
  3. Add layersIntroduce styling, layout, behaviors, states, Combo, and extensions in sequence.
  4. Validate for realCheck the target browser, DPR, GPU, and container dimensions.

AI-generated code still needs type checking, browser validation, and product-data review. Do not treat agent output as a production result by itself.

The engine an agent should understand

Intent & data

Applications and agents

  • Prompt
  • GraphData
  • React / Vue / Web
Public contract

Public API

  • Graph
  • register()
  • extensionFactory()
  • runLayout()
  • Public types
Orchestration

Graph runtime

  • DataModel
  • Layout & Transform
  • RenderScheduler
  • InteractionDispatcher
  • Behavior & Plugin
Rendering

Rendering and picking

  • regl Programs
  • GPU Picking
  • Label overlay
  • Combo underlay
Browser platform

Browser platform

  • WebGL2 → WebGL1
  • DOM & Canvas
  • Worker
  • ResizeObserver
  • rAF
First renderData → Transform → Layout → DataModel → WebGL and Canvas layers → Page
Frequent updatesState or position → RenderScheduler → GPU buffer patch or overlay redraw
The five G6Lite layers from application and AI-agent intent to the browser rendering platform.

The diagram shows stable responsibilities only. See Technical architecture for data flow, update paths, and extension boundaries.

Continue learning