Kibana custom panels: Any dashboard visual, generated from one prompt
The AI Agent writes the ES|QL query and the HTML template, then saves a custom panel that renders the same for everyone who opens the dashboard.
Observe, protect, and search your data with a single solution. From application monitoring to threat detection, Kibana is your versatile platform for critical use cases. Start your free 14-day trial now.
Custom panels put any HTML and CSS visual on a Kibana dashboard, including host health cards, request flow diagrams, funnels, and branded banners. Kibana’s catalog of visualizations and panel types covers what most dashboards need, and custom panels cover the rest: the visual your team wants that no fixed catalog can anticipate. Describe what you want, and the Elastic AI Agent writes the Elasticsearch Query Language (ES|QL) query and a template that matches your data. After that, the AI never runs again. Kibana saves the template inside the dashboard and refills it with live query results on every load, so everyone who opens the dashboard sees the panel that you built. Custom panels are available in Elastic Cloud Serverless and Elastic 9.6 on the Basic license.

How to create a custom panel from a prompt
With your dashboard open, select AI Agent in the header. The chat opens in a sidebar with the dashboard already attached. Then, type what you have in mind, for example:
Create a custom panel with a health status card for each host.
Create a custom panel that shows how data flows across the services.
Create a banner with an animated image.
If you omit “custom panel” in the prompt, the agent first checks whether a standard Kibana visualization fits and then whether a Vega visualization does. It creates a custom panel only when nothing else works.
When the panel needs live data, the agent writes the ES|QL query and builds an HTML template that matches the columns which the query returns. The panel renders on your dashboard as you watch. If you like it, save the dashboard. If you don’t, you can keep refining it in chat or edit the HTML and ES|QL by hand. Every chat answer keeps its own version, so if an earlier take was better, bring it back by selecting Preview on that answer’s card.
How to create a custom panel without the AI Agent
You can also start from the dashboard editor. Select Add in the top menu, and then select Custom:
Choose between generating the panel with the Elastic AI Agent or writing the HTML yourself. You can paste in code from an external agent, too, although the AI Agent path is faster because it also writes the ES|QL queries that your panel needs.
What you can build with custom panels
Custom panels accept any layout that HTML and CSS can express. Our teams have been asking the agent for:
Host health status boards with one card per host, showing error rate, request count, and a colored OK or warning badge, so the service that needs attention stands out.
Flowcharts and Sankey diagrams that follow traffic from destination regions through your edge network and data center to laptops, phones, and desktops, with request counts on every hop.
Funnels that follow users from first visit to checkout and show where they drop off.
Dashboard banners with your logo and brand colors, along with animated images. Any logo or images embedded in custom panels need to be passed as an inline SVG code, CSS shapes, or Unicode so they travel with the dashboard when you export it to another space or deployment.
Scorecards and summary cards that put several metrics in one block, with thresholds or badges, in addition to tabs that switch between views.
Tables with conditional formatting, where color, icons, and emphasis follow the values in each row.
Dashboard showing two custom panels: a host health status card at the top and a data flow animated chart below it.
Custom panels are one of four ways to put a visual on a dashboard. Here’s how they compare:
Standard visualization | Vega | Custom panel | Markdown panel | |
|---|---|---|---|---|
Best for | Common chart types | Custom charts from a JSON spec | Any HTML and CSS layout | Static text |
Data source | ES|QL query or Dataview | Query inside the spec | ES|QL query | None |
Responds to filters and time range | Yes | Yes | Yes | No |
You can also use custom panels to turn the output of your investigations into richer visuals right in the chat. Save them as a dashboard, and share them with your team:
Or create clear presentations that summarize your last week’s data for reporting:
You can even build an animated Formula 1 dashboard just for fun:
How custom panels respond to filters, time range, and themes
A custom panel with an ES|QL query responds to the time picker, the Kibana Query Language (KQL) query bar, filter pills, and controls, like any other panel on the dashboard.
Custom panels also follow your Kibana theme. Unless you specify otherwise, they use the same colors and spacing as the rest of Kibana, along with the same fonts, and adapt to light and dark modes.
How we built custom panels (behind the scenes)
A custom panel has two parts: an ES|QL query that fetches your data, and an HTML and CSS template that decides how it looks. The query returns rows and columns, and the template turns them into cards, badges, flows, or banners.
The first technical challenge was getting the agent to produce a template that fits your data. A model that guesses at your fields invents column names that don’t exist. So, before it writes anything, Kibana runs your query and gives the model the column names and their types, plus a few sample rows, and the template is written against what the query returns. If you later change only the look of the panel, Kibana skips this step and refines the existing template. If you change the query, it samples the data again.
Why custom panels don’t regenerate on every dashboard load
Our first approach saved your prompt with the panel and asked the AI to generate it on every dashboard load. To keep results consistent, the AI first expanded your short prompt into a much longer one covering layout, colors, and how to use each field. It still wasn’t enough. A model rarely gives the same answer twice, so a colleague you shared the dashboard with might see a different panel than the one you built. Refining had the same problem; you asked for one small change, and other parts of the panel shifted, too.
We tried to hide this with a cache, so each panel was generated once and reused. It quickly grew complicated and still couldn’t guarantee that two people would see the same panel. So we changed the design. The AI now runs only while you chat, and its result is saved as a template inside the dashboard.
How custom panels sandbox HTML
Safely rendering untrusted HTML was a constraint that we designed around from the start. A custom panel can carry arbitrary HTML, so we treat every panel as untrusted, regardless of who or what produced it, which is what makes it safe to let the agent write one. Each panel renders in a sandbox that blocks scripts and external resources and that strips links except those pointing to Kibana dashboards and Discover. The content is sanitized before it’s shown. A panel can draw but nothing else. It can’t execute code or reach the network, and it can’t touch anything else in your browser session, so a generated panel has no more reach than a Markdown panel.
Build your first custom panel
Custom panels are available now in Elastic Cloud Serverless and Elastic 9.6 on the Basic license. To generate panels with chat, set up Elastic AI Agent in your deployment or project. See the custom panels documentation or this video tutorial for details. We’d like to hear what you build, so send us your feedback.
How helpful was this content?




