Skip to content

docs: add ai controller documentation#5473

Open
ugur-vaadin wants to merge 24 commits into
mainfrom
docs-add-ai-controller-docoumentation
Open

docs: add ai controller documentation#5473
ugur-vaadin wants to merge 24 commits into
mainfrom
docs-add-ai-controller-docoumentation

Conversation

@ugur-vaadin
Copy link
Copy Markdown
Contributor

No description provided.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 13, 2026

Preview Deployment

This PR has been deployed for preview.

URL: https://docs-preview-pr-5473.fly.dev

Built from 4a1b56e

@ugur-vaadin ugur-vaadin requested a review from tomivirkki April 13, 2026 16:05
@ugur-vaadin ugur-vaadin changed the title docs: add ai controller docoumentation docs: add ai controller documentation Apr 13, 2026
Comment thread articles/flow/ai-support/ai-powered-chart.adoc Outdated
Comment thread articles/flow/ai-support/ai-powered-chart.adoc Outdated
Comment thread articles/flow/ai-support/ai-powered-grid.adoc Outdated
Comment thread articles/flow/ai-support/ai-powered-grid.adoc Outdated
Comment thread articles/flow/ai-support/controllers.adoc Outdated
Comment thread articles/flow/ai-support/controllers.adoc Outdated
Comment thread articles/flow/ai-support/index.adoc Outdated
Comment thread articles/flow/ai-support/index.adoc Outdated
Comment thread articles/flow/ai-support/tool-calling.adoc Outdated
Comment thread articles/flow/ai-support/tool-calling.adoc Outdated
Comment thread articles/flow/ai-support/ai-powered-chart.adoc Outdated
@ugur-vaadin ugur-vaadin force-pushed the docs-add-ai-controller-docoumentation branch from e5fcc24 to a1bb498 Compare April 22, 2026 11:32
Comment thread articles/flow/ai-support/ai-powered-chart.adoc Outdated
Comment thread articles/flow/ai-support/ai-powered-chart.adoc Outdated
Comment thread articles/flow/ai-support/ai-powered-chart.adoc Outdated
Comment thread articles/flow/ai-support/ai-powered-chart.adoc Outdated
Comment thread articles/flow/ai-support/ai-powered-grid.adoc Outdated
Comment thread articles/flow/ai-support/ai-powered-grid.adoc
Comment thread articles/flow/ai-support/controllers.adoc Outdated
Comment thread articles/flow/ai-support/controllers.adoc Outdated
Comment thread articles/flow/ai-support/controllers.adoc Outdated
@ugur-vaadin ugur-vaadin marked this pull request as ready for review April 23, 2026 14:52
Comment thread articles/flow/ai-support/controllers.adoc Outdated
Copy link
Copy Markdown
Contributor

@rolfsmeds rolfsmeds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Could mention somewhere on AI-Powered Charts page that it can be combined with Dashboard (link) to create persistable, end-user configurable AI-generated dashboards.
  • The Building Apps > AI > Quick Start Guide could link to AI charts & grids pages in the Next Possible Steps section.
  • Grid docs page should link to AI-Powered Grid page somewhere (e.g. below Related Components table)
  • Charts docs should link to AI-Powered Charts page somewhere (it's such a big deal that I think we should create a new sub-page for it that repeats the basic example and links to the AI Grid page)
  • File Attachments page should linkn to UploadManager docs.
  • On the LLM Providers page, one sentence explaining what AI frameworks are, and how they relate to LLM models, would be good for the non-initiated.
  • In the Basic Usage example, getLLMProvider seems superfluous as it just initializes one class. Would be better for understandability to just initialize the Mock provider right there instead of a separate method.

Comment thread articles/flow/ai-support/index.adoc Outdated

* **Orchestrator** -- [classname]`AIOrchestrator` is a non-visual coordination engine that connects UI components to an LLM provider. It has no DOM element and should not be added to a layout.
* **Provider** -- [classname]`LLMProvider` is the interface for communicating with LLM frameworks. Create a provider by instantiating [classname]`SpringAILLMProvider` or [classname]`LangChain4JLLMProvider` directly. You can also implement this interface to connect to any other LLM framework.
* **Provider** -- plugs the orchestrator into any LLM framework. Spring AI and LangChain4j are built in via [classname]`SpringAILLMProvider` and [classname]`LangChain4JLLMProvider`; add others by implementing the [classname]`LLMProvider` interface.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe better to use the term LLM Provider here?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated to use "LLM Provider".

@@ -8,8 +8,6 @@ order: 40

= Tool Calling & Programmatic Prompts

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One sentence explainer of what tools are would be good for the non-initiated. Maybe also mention (and link to) Controllers, as they are related.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added:

  • an intro paragraph at the top of the page
  • note that controllers are the framework-agnostic alternative
  • the link

}

@Override
public String getSchema() {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we also mention here that you can get the schema automagically through a query, so that you don't have to paste everything here in a hardcoded string and remember to update it whenever it changes?

Should also clearly indicate that you can add whatever free-form additional information here e.g. explaining the fields etc.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a paragraph after the JdbcDatabaseProvider example explaining that getSchema() can return whatever helps the LLM. It includes building the description at runtime and adding free-form info.

= [since:com.vaadin:vaadin@V25.2]#AI-Powered Grid#


[classname]`GridAIController` populates a [classname]`Grid` with data from the application database based on natural-language requests. Backed by a <<controllers#database-provider,[classname]`DatabaseProvider`>>, the controller lets the LLM inspect the database schema and run SQL queries that drive the grid.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to Grid docs page.
Explain what Grid is ("table or datagrid component") for those ending up here from Google without familiarity with Vaadin.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the link and a description of the Grid.

[source,java]
----
controller.addStateChangeListener(state ->
sessionStore.save(sessionId, state));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we assume everyone is familiar with sessionStore? If not, should briefly explain and mention other alternatives.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a follow-up sentence after the listener snippet noting that it is a placeholder for the developer's own storage.

= [since:com.vaadin:vaadin@V25.2]#AI-Powered Chart#


[classname]`ChartAIController` creates and updates a [classname]`Chart` visualization based on natural-language requests. Backed by a <<controllers#database-provider,[classname]`DatabaseProvider`>>, the controller lets the LLM inspect the database schema, write SQL queries for one or more series, and update the Highcharts configuration independently of the data.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Link to Chart docs.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the link.

[source,java]
----
controller.addStateChangeListener(state ->
sessionStore.save(sessionId, state));
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as for Grid: can we assume everybody knows sessionStore?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a follow-up sentence here too.

@ugur-vaadin ugur-vaadin force-pushed the docs-add-ai-controller-docoumentation branch from a144bc5 to 6633c77 Compare May 15, 2026 10:40
@ugur-vaadin
Copy link
Copy Markdown
Contributor Author

  • Could mention somewhere on AI-Powered Charts page that it can be combined with Dashboard (link) to create persistable, end-user configurable AI-generated dashboards.

Added a "Combining with Dashboard" section at the end of the page, with a link to the Dashboard component docs.

  • The Building Apps > AI > Quick Start Guide could link to AI charts & grids pages in the Next Possible Steps section.

Added links to the "Next Possible Steps" section.

  • Grid docs page should link to AI-Powered Grid page somewhere (e.g. below Related Components table)

Added a bullet to the sub-pages list linking to AI-Powered Grid.

  • Charts docs should link to AI-Powered Charts page somewhere (it's such a big deal that I think we should create a new sub-page for it that repeats the basic example and links to the AI Grid page)

Created a dedicated sub-page under the Charts section. It repeats the basic example and links to the full AI-Powered Chart page, as well as to AI-Powered Grid.

  • File Attachments page should linkn to UploadManager docs.

Added links to the Upload component docs.

  • On the LLM Providers page, one sentence explaining what AI frameworks are, and how they relate to LLM models, would be good for the non-initiated.

Added an opening sentence.

  • In the Basic Usage example, getLLMProvider seems superfluous as it just initializes one class. Would be better for understandability to just initialize the Mock provider right there instead of a separate method.

Removed `getLLMProvider().

@ugur-vaadin ugur-vaadin force-pushed the docs-add-ai-controller-docoumentation branch from a744646 to 280fbb4 Compare May 22, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants