> ## Documentation Index
> Fetch the complete documentation index at: https://lightdash-mintlify-ca973f84.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Editing dashboards with agents

> Use AI coding agents to bulk edit dashboards and charts using the download-edit-upload workflow.

AI coding agents like Cursor, Claude Code, and Codex can help you make bulk edits to dashboards and charts. This guide explains the recommended workflow for using agents to modify your Lightdash content.

## Recommended workflow: temporary files

When using agents to edit dashboards, treat the downloaded YAML files as **temporary working files** rather than source-of-truth files you commit to your repository.

The workflow is:

1. **Download** the content you want to change using `lightdash download`
2. **Edit** the YAML files using your AI agent
3. **Upload** the changes back to Lightdash using `lightdash upload`
4. **Discard** the local files instead of committing them

```bash theme={null}
# Download the dashboard you want to edit
lightdash download -d https://app.lightdash.cloud/your-dashboard-url

# Use your AI agent to make changes to the YAML files
# ...

# Upload the changes back to Lightdash
lightdash upload

# Discard the local files (don't commit them)
rm -rf lightdash/
```

### Why this approach?

This workflow keeps Lightdash as the source of truth for your dashboards and charts. The benefits include:

* **UI changes remain easy** — Team members can continue making changes directly in the Lightdash UI without worrying about keeping a codebase in sync
* **No repository maintenance** — You don't need to maintain dashboard YAML files alongside your dbt project
* **Flexibility** — Different team members can use whichever editing method works best for them (UI or code)

### When to commit dashboard code

While the temporary file workflow is recommended for most teams, there are situations where committing dashboard code makes sense:

* **Version-controlled templates** — When you want to maintain reusable dashboard templates across projects
* **CI/CD pipelines** — When dashboards are deployed as part of an automated workflow
* **Strict change management** — When all changes must go through code review

Choose the approach that best fits your organization's goals and workflows.

## Setting up your agent

To use AI agents effectively with dashboards as code:

1. [Install Lightdash skills](/guides/developer/agent-skills) for your coding agent
2. Connect your agent to the [Lightdash MCP](/references/integrations/lightdash-mcp) for semantic layer access
3. Ensure the [Lightdash CLI](/guides/cli/how-to-install-the-lightdash-cli) is installed and authenticated

## Example prompts

Once set up, you can prompt your agent to make changes like:

```
Add a filter for date_created to all charts on this dashboard
```

```
Change all bar charts to use the company brand color #8072ff
```

```
Create a new chart showing monthly revenue trends and add it to this dashboard
```

```
Update the description on all charts to include the data source
```

The agent uses the downloaded YAML files and Lightdash skills to make the changes, then you upload the results back to Lightdash.

## Next steps

* [Dashboards as code reference](/guides/developer/dashboards-as-code) — Full reference for the download and upload commands
* [Agent skills](/guides/developer/agent-skills) — Install skills to help your agent understand Lightdash
* [Lightdash MCP](/references/integrations/lightdash-mcp) — Connect your agent to the semantic layer
