AI agent workflow
VizChat runs a single agent with an on-demand skill for widget building — it gathers context, finds or builds a widget, writes the document, and validates it.
The shape of the system
VizChat runs one agent, built on Google ADK, with the tools it needs available directly and a specialised capability — building a new widget — loaded only when it is actually needed. Keeping rarely-used tools out of the default tool list means a simple question doesn't drag a pile of irrelevant tools into the context.
The agent doesn't just advise: it reads and writes your document itself, through tool calls you can watch in the conversation.
How a request flows
A typical "add a sales bar chart for me" request goes through roughly these stages.
Gather context
Depending on what you asked for, the agent may:
read_yaml_path— read the current document, so it edits what is already there instead of duplicating itread_document/search_document— pull in workspace documents you referenced or uploadedfetch_reader— read a webpage or linkweb_search— look up external data when the prompt calls for itexecute_python_code— compute or reshape data before it goes into a widget
Find a widget
search_widgets searches built-in and user-published widgets from the same pool; get_widget_operations then returns the fields and operations that widget actually accepts. Widgets you have favorited or @-mentioned are considered first.
If nothing fits, the agent loads the build_user_widget skill — an on-demand bundle that exposes the widget-building toolchain, letting it build and publish a new widget without leaving the conversation. The result is private to you by default; the agent can use emit_client_action to open the widget editor so you can review, tweak, or publish it.
Write and validate
The widget and its data are written into the document, and further changes are made as precise path edits with edit_yaml_path. Once editing is done, validate_board checks the document structure, that no widget is operated on before it is created, and that referenced workspace documents exist.
Agent tool inventory
| Area | Tools |
|---|---|
| Document editing and validation | read_yaml_path, edit_yaml_path, validate_board |
| Widget discovery | search_widgets, get_widget_operations |
| Workspace files | list_documents, read_document, search_document, create_document, edit_document, move_document, delete_document |
| Web | web_search, fetch_reader |
| Computation | execute_python_code |
| Frontend side effects | emit_client_action (open a tab, show a toast) |
| On-demand skill | build_user_widget — widget-building tools, loaded only when needed |
Triggering the agent
- Type in the chat panel — the most common entry
- Select a widget, then chat — scopes the conversation to that widget as focus context
- Reference a document with
@— points the agent at a specific workspace file - Upload a file — uploaded documents are parsed and can be read straight away
See prompt writing techniques.
Cost and models
You pick the model in the chat panel: two official slots (Smart and Fast, with Fast as the default), plus any personal model you've configured with your own provider key via BYOK — once BYOK is enabled, no platform credits are consumed, only your key's own quota.
Credit consumption for each agent call is recorded per session. See credits system.