Skip to main content
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. 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
# 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 for your coding agent
  2. Connect your agent to the Lightdash MCP for semantic layer access
  3. Ensure 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