Skip to main content
A natural-language prompt assembled by an agent into a live four-widget dashboard — Postgres table sizes, Redis memory, recent app errors, and cluster health — each from a different data source
An agent asked to “build me a production dashboard for my SaaS” produced a complete operational overview: Postgres table sizes, Redis memory, recent application errors, and cluster health, all as live auto-refreshing widgets. One conversation, zero config. This is the kind of dashboard that normally means stitching together Grafana panels, writing SQL by hand, configuring Prometheus exporters, and wiring up log aggregation. Here, it’s a conversation.

The Prompt

“I’m running a SaaS app on Akua (Postgres for data, Redis for caching). Create a dashboard that shows me database table sizes, Redis memory, recent app errors from logs, and overall cluster health. I want to open this every morning and know if anything needs attention.”
The agent creates four snippets and assembles them into a dashboard.

Widget 1: Postgres Table Sizes (Table)

The agent uses exec to run psql inside the Postgres container and query pg_stat_user_tables:
Displays as a table with columns: table name, total size, index size, row count, and a health flag that warns when dead tuples exceed 10% (the table needs vacuuming).

Widget 2: Redis Memory (Stat)

Runs redis-cli inside the Redis pod and extracts the key metric:
Displays as a single stat: 48.23M used / 52.10M peak (frag: 1.12). At a glance: memory is healthy, fragmentation is low.

Widget 3: Recent App Errors (Logs)

Fetches container logs from the application pod and filters for errors:
Displays as a log viewer with syntax-highlighted output showing the last error lines from each app pod. Opens your morning with either a clean “No recent errors” or the exact lines that need attention.

Widget 4: Cluster Health (Table)

Queries the Akua API for cluster status (no exec needed, this is platform data):
Shows each cluster with its status, KaaS version, and how many of its installs are healthy. This is the infrastructure-level complement to the app-level widgets above.

The Result

Four widgets, one dashboard, auto-refreshes on load: Open it every morning. If all four widgets look green, grab your coffee. If something’s off (a table needs vacuuming, Redis fragmentation is high, error logs are spiking, or an install failed), you see it immediately.

Why this matters

This dashboard combines four different data sources (a SQL database, an in-memory cache, container logs, and the Akua platform API) into a single view. Normally, this means:
  • Grafana with Prometheus exporters for Redis and Postgres metrics
  • A log aggregation pipeline (Loki, ELK) for application errors
  • A separate infrastructure dashboard for cluster health
  • Hours of configuration, and ongoing maintenance for all of it
Here, the agent wrote four JavaScript functions in a single conversation. The snippets are disposable. If you want to add a column, change the SQL query, or filter logs differently, tell the agent. No YAML, no exporters, no pipeline configuration. And because snippets can call any Akua API endpoint, including exec into any container, the same pattern works for any application: MongoDB stats, RabbitMQ queue depths, Nginx traffic analysis, Elasticsearch cluster health, or whatever runs in your pods.

Dashboard generation

The full workflow for building live dashboards with an agent.

Database operations

More Postgres, Redis, and chained exec patterns.

Kubernetes access

The exec and kube proxy endpoints behind these widgets.

Code Mode in action

More examples of agents composing complex operations.