Deploy the Dashboard Builder Agent
The Dashboard Builder agent is not deployed automatically when the aiDashboard package is installed. Without this step, the chat input on the dashboard page accepts prompts but returns no response and surfaces no error. Follow this tutorial to deploy the agent and connect it to your application's data model.
Deploy the agent
Call AiDashboardAgentDeploymentUtil.deploy(spec) from the C3 AI console, passing a DeploySpec that specifies your LLM model and credentials:
AiDashboardAgentDeploymentUtil.deploy(
AiDashboardAgentDeploymentUtil.DeploySpec.make({
model: GenaiCore.Llm.OpenAi.Model.make({
model: 'gpt-4o',
auth: GenaiCore.Llm.OpenAi.Auth.forConfigKey('openai')
})
})
);Replace the model and auth values with those matching your configured LLM client.
To use a pre-configured Genai.StructuredData.DataModelGraph instance, pass the optional dataModelName parameter:
AiDashboardAgentDeploymentUtil.deploy(
AiDashboardAgentDeploymentUtil.DeploySpec.make({
model: GenaiCore.Llm.OpenAi.Model.make({
model: 'gpt-4o',
auth: GenaiCore.Llm.OpenAi.Auth.forConfigKey('openai')
}),
dataModelName: 'my-data-model'
})
);If dataModelName is omitted, the deployment creates and uses a default instance named 'default'.
This method performs the following steps:
- Configures the LLM client with the specified model.
- Creates or retrieves a
Genai.StructuredData.DataModelGraphinstance using the name fromdataModelName, or'default'if not specified. This instance controls which entity types the agent can query. - Drafts the agent from the built-in Dashboard Builder template.
- Deploys and versions the agent.
- Configures the UI to use the deployed agent.
Register your data model
The DataModelGraph determines which entity types are available to the agent via execute_retrieval_spec_tool. Without registration, the agent cannot access application data and notifies that the requested data is unavailable.
Register your application's queryable types after deploying the agent:
var graph = Genai.StructuredData.DataModelGraph.forName('default');
graph.withTypes(['YourEntityType', 'AnotherEntityType']).upsert();The name 'default' refers to the data model graph created by the default deployment. If you deployed with a custom dataModelName, use that name instead.
Consult your data model documentation for the entity type names to register.
Verify the deployment
To confirm the agent is working:
- Navigate to
<studio_cluster_url>/my-dashboard. - Select Edit in the top-right corner of the dashboard page.
- Select an empty tile.
- Enter a prompt that references a registered entity type, for example:
Show total power output by turbine for the last 30 days as a bar chart. - Confirm the visualization renders in the active tile.
- Reload the page and confirm the tile still shows the visualization.
A successful deployment produces a rendered chart within the tile. If the tile remains empty after the prompt completes, check that the LLM client is configured and that the requested entity type is registered in the DataModelGraph.
Redeploy after updates
Call deploy() again when any of the following change:
- The LLM model or client configuration.
- The agent system prompt.
- The set of registered entity types.
To tear down the current deployment before redeploying:
AiDashboardAgentDeploymentUtil.teardown();
AiDashboardAgentDeploymentUtil.deploy(
AiDashboardAgentDeploymentUtil.DeploySpec.make({
model: GenaiCore.Llm.OpenAi.Model.make({
model: 'gpt-4o',
auth: GenaiCore.Llm.OpenAi.Auth.forConfigKey('openai')
})
})
);