AI coding assistants (also known as AI agents) can accelerate your Dash development workflow. Dash’s declarative, component-based layout means an AI assistant can generate full-stack data apps without juggling separate frontend and backend codebases. Combined with Plotly’s expressive charting API, AI assistants can go from a natural-language prompt to a polished, interactive dashboard in minutes.
This guide covers how to configure popular AI assistants for optimal Dash development, including recommended project configuration files.
Provide sample data: Include example data structures or attach sample CSVs so the AI can generate appropriate visualizations.
Describe callback relationships: For complex apps, explain how callbacks should chain together.
Use plotly.express first: Tell the AI to start with plotly.express for charts—it’s simpler and covers most use cases. Switch to plotly.graph_objects only when you need fine-grained control.
Ask for multi-page apps explicitly: If you want navigation between views, tell the AI to use Dash Pages (dash.register_page). Otherwise it will default to a single-page layout.
Include your requirements.txt: Paste or reference your existing dependencies so the AI doesn’t introduce conflicting packages or miss what’s already available.
Iterate visually: Run the app after each change. Describe what you see and what you want done differently. AI assistants respond well to feedback like “make the sidebar narrower” or “add a loading spinner to the graph”.
Specify your target: Mention if you’re publishing to Plotly Cloud or Dash Enterprise (the required files and workflow differ). More on this below.
AI assistants can generate Dash apps, but the resulting app runs on localhost and can’t be shared directly. To put your app in front of colleagues or stakeholders, you need to publish it to a server.
This is where Plotly Cloud and Dash Enterprise complete the AI-assisted workflow. Hosting, scaling, and authentication are all handled by the platform—so neither you nor the AI agent need to write infrastructure code. The agent focuses entirely on your app logic and visualizations, and a single CLI command publishes the result to a production-ready environment.
The Plotly Cloud CLI (currently in early access) lets you publish directly from the command line. Install it with:
pip install "dash[cloud]"
Then publish your app:
plotly app publish --name "Q1 Sales Dashboard"
This works well with AI-assisted workflows since the agent can run the publish command after generating your app code.
If your organization uses Dash Enterprise, you or an AI agent can deploy apps using the Dash Enterprise CLI (de-client). The CLI is included in the dash-enterprise-libraries package.
Install it with:
pip install dash-enterprise-libraries --extra-index-url <your-dash-enterprise-url>/packages
Then deploy your app:
de deploy . --name "q1-sales-dashboard"
See Publishing Your App for more details on publishing options.
An AGENTS.md file in your project root helps AI assistants understand your publishing target and project conventions. Some tools use different names for this file, so the easiest way to set this up is to copy the relevant configuration below and paste it directly into your AI assistant’s chat. Ask it to save the configuration either globally or for your specific project.
Choose the configuration that matches your publishing target:
# Dash App
This is a Plotly Dash app. Dash is a Python framework for building analytical web apps.
## Publishing
This app publishes to Plotly Cloud using the Plotly Cloud CLI.
### Commands
```bash
# Log in (opens browser for OAuth)
plotly user login
# Publish to Plotly Cloud
plotly app publish --name "My Dashboard" --team "my-team"
# Check status — run after publishing to confirm the app is live
# Typical publish takes 1-2 minutes. Re-run until status shows "deployed"
plotly app status
```
### Running Locally
```bash
plotly app run app:app --debug --open
```
### Configuration
Create a `plotly-cloud.toml` in the project root:
```toml
[app]
name = "my-dashboard"
entrypoint = "app:app"
[publish]
team = "my-team-id"
```
## File Structure
```
my-dash-app/
├── app.py # Main application file
├── assets/ # Static files (CSS, images, favicon)
├── requirements.txt # Python dependencies
├── plotly-cloud.toml # Plotly Cloud configuration
└── AGENTS.md # This file
```
## Dependencies
Install with: `pip install "dash[cloud]"`
# Dash App
This is a Plotly Dash app. Dash is a Python framework for building analytical web apps.
## Publishing
This app deploys to Dash Enterprise using the Dash Enterprise CLI (`de-client`).
### Commands
```bash
# Log in to Dash Enterprise (opens browser)
de --host your-dash-enterprise.example.com login
# Deploy (creates the app if it doesn't exist)
de deploy . --name my-dashboard
# Check status — re-run until status shows "deployed" (typically 2-5 minutes)
# Build statuses: queued → building → built → failed
# Deploy statuses: built → deploying → deployed → failed
de apps status --name my-dashboard
de apps logs --name my-dashboard --type build
de apps logs --name my-dashboard --type runtime
```
### Managing the App
```bash
de apps list # List your apps
de apps restart --name my-dashboard # Restart
de apps logs --name my-dashboard --type runtime # Runtime logs
```
### Databases
```bash
de services create --app-name my-dashboard --type redis
de services create --app-name my-dashboard --type postgres
de services list --type all
```
## Required Files
### Procfile (required)
Declares how to run the app:
```
web: gunicorn app:app --workers 4
```
For apps with background tasks:
```
web: gunicorn app:app --workers 4
worker: celery -A app:celery_instance worker
```
### project.toml (optional)
Build configuration and deploy scripts:
```toml
[scripts]
predeploy = "predeploy.sh"
```
### Aptfile (optional)
System-level packages:
```
unixodbc
unixodbc-dev
```
## File Structure
```
my-dash-app/
├── app.py # Main application file
├── assets/ # Static files (CSS, images, favicon)
├── requirements.txt # Python dependencies
├── Procfile # Process declarations (required)
├── project.toml # Build configuration (optional)
├── Aptfile # System packages (optional)
└── AGENTS.md # This file
```
## Important Notes
- The `Procfile` is required — without it, the app won't start
- Use `gunicorn` as the WSGI server (include it in `requirements.txt`)
For larger Dash apps, extend your AGENTS.md with project-specific details:
## Project-Specific Patterns
### Multi-Page Apps
This app uses Dash Pages (`dash.page_registry`):
- Pages are in `pages/` directory
- Each page registers with `dash.register_page(__name__)`
### Data Sources
- On Dash Enterprise, use the built-in data sources feature to connect to databases: <a href="https://dash.plotly.com/dash-enterprise/data-sources">https://dash.plotly.com/dash-enterprise/data-sources</a>
- On Plotly Cloud, configure database connections in `config.py` and use environment variables for credentials