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 workflow for using agents to modify your Lightdash content.

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

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)
This workflow doesn’t support concurrent editing. lightdash upload replaces the content in Lightdash with your local copy, so if two people edit the same object at the same time, the later upload overwrites the earlier changes. Use temporary files only when one person changes a given object at a time.

When to commit dashboard code

Commit dashboard code and manage it in Git in these situations:
  • Concurrent editing — When multiple people need to change the same dashboards or charts. See Git-managed dashboards
  • 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:
The agent uses the downloaded YAML files and Lightdash skills to make the changes, then you upload the results back to Lightdash.

Next steps