# Create Sentry Dashboards with Your AI Coding Agent

> Use the Sentry CLI and your AI coding agent's repo context to automatically create meaningful dashboards (errors, performance, product analytics) in minutes.

**URL:** https://sentry.io/cookbook/create-dashboards-with-ai-agent/

---

Point your AI coding agent at the Sentry CLI and it builds dashboards tailored to your codebase, with no manual widget configuration required.

**Time:** 10-15 minutes | **Difficulty:** Beginner

## What You'll Learn

- Installed and authenticated the Sentry CLI

- Registered the CLI as a skill so your AI agent can use it directly

- Prompted your agent to build dashboards tailored to your codebase

**Topics:** Dashboards, CLI

## Steps

### 1. Install the Sentry CLI

Install the [Sentry CLI](https://cli.sentry.dev) using one of the methods below. It provides the `sentry dashboard` commands your agent will use to create and populate dashboards.

### 2. Authenticate the CLI

Log in to Sentry from the CLI so it can create and modify dashboards on your behalf. Running `sentry auth login` opens a browser window to complete OAuth authentication.

Alternatively, pass your token directly using `sentry auth login --token YOUR_TOKEN`. This is useful if you want your agent to run CLI commands non-interactively.

### 3. Register the CLI skill with your agent

Give your AI agent structured access to the Sentry CLI by registering it as a skill. This lets the agent discover and use all available `sentry` commands directly, rather than relying on it to infer the syntax.

Run this in your terminal, then open or restart your agent session:

### 4. Ask your agent to create dashboards

Open your AI coding agent inside your project directory and give it a prompt like the one below. Because the agent has full repo context (your routes, models, key functions, and common flows), it can decide which metrics actually matter for your app.

Feel free to be specific or leave it open-ended and let the agent decide based on the codebase.

### 5. View and refine your dashboards

Once the agent finishes running the CLI commands, your dashboards are live. Open [Dashboards](https://sentry.io/orgredirect/organizations/:orgslug/dashboards/) in Sentry to see them.

From here you can pin dashboards to your home screen and share them with your team. If a widget isn't quite right, ask the agent to iterate using `sentry dashboard widget edit` or `sentry dashboard widget delete`, or tell it to add new ones with more specific queries.

## FAQ

**Do I need a paid Sentry plan to use Dashboards?**

No. Dashboards are available on the free plan. You can create custom dashboards and widgets without upgrading.

**Which AI coding agents work with this recipe?**

Any agent that supports the skills system works, such as Claude Code. The agent needs to support `npx skills add` to register the Sentry CLI skill and be able to execute `sentry` CLI commands in your project directory.

**Can the agent update or delete dashboards it already created?**

Yes. Use `sentry dashboard widget edit` to update existing widgets and `sentry dashboard widget delete` to remove them. You can also delete an entire dashboard from the Sentry UI.

**What if the agent creates widgets with the wrong queries?**

Ask the agent to fix specific widgets using `sentry dashboard widget edit '' --title '' --query `. Or use `sentry dashboard view ''` to list current widget definitions and iterate from there.

**Does the Sentry CLI work with self-hosted Sentry?**

Yes. Set the `SENTRY_URL` environment variable to your self-hosted instance URL before running any CLI commands.

---

*Source: [sentry.io/cookbook/create-dashboards-with-ai-agent/](https://sentry.io/cookbook/create-dashboards-with-ai-agent/)*
