Dashboard and AI coding agents
Ce contenu n’est pas encore disponible dans votre langue.
AI coding agents can use the Aspire CLI and Aspire MCP server to fetch logs and telemetry from the Aspire dashboard. This gives agents the same observability data that developers see in the dashboard UI — structured logs, distributed traces, resource status, and console output — so they can diagnose issues, verify fixes, and add new features with full context.
How agents use dashboard data
Section titled “How agents use dashboard data”When an Aspire app is running, the dashboard collects OpenTelemetry data from all resources. AI coding agents access this data through two channels:
- Aspire CLI — Commands like
aspire logs,aspire otel logs,aspire otel traces, andaspire describeretrieve resource status, console logs, and telemetry directly from the terminal. All commands support--format Jsonfor structured output that agents can parse. - Aspire MCP server — The MCP server exposes tools such as
list_resources,list_structured_logs,list_traces, andlist_console_logsthat agents call directly through the Model Context Protocol.
Both channels draw from the same underlying dashboard data. Whether an agent reads logs via the CLI or through MCP tools, it sees the same information as the dashboard UI.
Typical agent workflow
Section titled “Typical agent workflow”The following workflow is an example — Aspire skill files teach agents the best patterns to run and debug Aspire apps automatically. A typical agent-driven debugging session looks like this:
- The agent starts the Aspire app with
aspire startand waits for resources to become healthy withaspire wait. - The agent runs
aspire describeto check resource status and identify any unhealthy services. - The agent fetches structured logs with
aspire otel logsor thelist_structured_logsMCP tool, filtering by resource name to find errors. - The agent retrieves distributed traces with
aspire otel tracesto understand cross-service request flow and identify latency issues. - Using the collected data, the agent makes code changes, restarts the affected resource, and verifies the fix by checking logs and traces again.
Get started
Section titled “Get started”The fastest way to set up AI coding agents with Aspire is the aspire agent init command. See Use AI coding agents for the full setup guide, including skill files, MCP server configuration, and supported AI assistants.
Standalone mode
Section titled “Standalone mode”The Aspire CLI and MCP server work with the standalone dashboard — you don’t need an Aspire AppHost project. This is useful when monitoring any application that sends OpenTelemetry data to the dashboard.
Start the standalone dashboard
Section titled “Start the standalone dashboard”Start the dashboard using the Aspire CLI:
aspire dashboard run --allow-anonymousThe dashboard starts with the following defaults:
- Frontend UI at
http://localhost:18888 - OTLP/gRPC endpoint at
http://localhost:4317 - OTLP/HTTP endpoint at
http://localhost:4318
Use Aspire CLI with the standalone dashboard
Section titled “Use Aspire CLI with the standalone dashboard”Pass --dashboard-url with the full frontend URL to point CLI commands at a standalone dashboard:
aspire otel logs --dashboard-url "http://localhost:18888"aspire otel traces --dashboard-url "http://localhost:18888"aspire otel spans --dashboard-url "http://localhost:18888"Use Aspire MCP with the standalone dashboard
Section titled “Use Aspire MCP with the standalone dashboard”Start the MCP server in dashboard-only mode using --dashboard-url:
aspire agent mcp --dashboard-url "http://localhost:18888"This exposes the dashboard’s telemetry tools (structured logs, traces, and resource data) to any MCP-compatible AI assistant.
Configuration is required in the agent to use the MCP server. For configuration details, see Aspire MCP server configuration. The --dashboard-url must be passed as a command line argument when configuring the MCP server for standalone use.
Sample skill for standalone dashboard
Section titled “Sample skill for standalone dashboard”The following is a sample skill file that teaches an AI coding agent how to start the standalone dashboard and query its data. Save it as .github/skills/aspire-standalone/SKILL.md (for GitHub Copilot) or .claude/skills/aspire-standalone/SKILL.md (for Claude Code):
---name: aspire-standalonedescription: Use the Aspire standalone dashboard for observability. Start the dashboard, send telemetry, and query logs and traces with the Aspire CLI.---
# Aspire Standalone Dashboard
## Start the dashboard
```bashaspire dashboard run --allow-anonymous```
The dashboard UI is at http://localhost:18888.Apps should send OpenTelemetry to http://localhost:4317 (gRPC) or http://localhost:4318 (HTTP).
## Query telemetry
View structured logs:
```bashaspire otel logs --dashboard-url http://localhost:18888```
View distributed traces:
```bashaspire otel traces --dashboard-url http://localhost:18888```
View trace spans:
```bashaspire otel spans --dashboard-url http://localhost:18888```
## Rules
- Ensure the dashboard has started querying telemetry. The dashboard may already be running.- Use `--format Json` with CLI commands when you need to parse the output.- Check `aspire otel logs` for errors after making code changes.- Use `aspire otel traces` to investigate cross-service latency.See also
Section titled “See also”- Use AI coding agents — full setup guide with
aspire agent init - Aspire MCP server — MCP tools, security, and troubleshooting
- Standalone Aspire dashboard — running the dashboard without an AppHost
- Aspire CLI reference