Use AI coding agents with Aspire observability
Run aspire agent init to configure plugins and skill catalogs in your agent’s settings. By default, setup enables Aspire skills that teach your agent to use the CLI, inspect local services, and work with TypeScript or C# AppHosts. In a Copilot agent environment, the Aspire plugin also provides canvases for environment checks, AppHost resources, and wiring proposals.
Your skillSources configuration can add other sources or exclude Aspire’s. A runtime MCP server is optional.
Why Aspire for coding agents
Section titled “Why Aspire for coding agents”Aspire gives coding agents access to the resource status, health checks, application logs, and distributed traces you inspect in the Aspire dashboard. Start with Aspire skills and the Aspire CLI; add the Aspire MCP server if you want runtime tools exposed through MCP. Both paths let an agent investigate the same request evidence as a developer.
The Aspire CLI is built for agent-driven workflows — commands support non-interactive execution to avoid blocking on prompts, and many commands support --format Json for structured plain text output. Key commands include aspire start (background execution), aspire start --isolated (parallel worktrees), aspire wait (block until healthy), aspire describe, aspire logs, and aspire docs search.
Aspire workflow skills teach agents these patterns.
For plugin setup, additional skill sources, companion tools, and the full skill list, see Aspire skills.
Get started
Section titled “Get started”When you create a new Aspire project with aspire new or aspire init, you’re prompted to configure AI agent environments. You can also run aspire agent init at any time to set up or update the configuration.
-
Open a terminal in your Aspire project directory (the folder containing your AppHost).
-
Run the following command:
Aspire CLI aspire agent init -
Select your agents,
aspire, and any companion tools. Choose project or global scope.For details about plugins, workflow skills, Playwright CLI, and dotnet-inspect, see Aspire skills.
To enable MCP, choose it during a standalone setup or pass --mcp. The aspire new and aspire init commands skip MCP setup.
What gets configured
Section titled “What gets configured”The CLI detects agent environments and edits settings for the agents you select. It recognizes the GitHub Copilot app even without the standalone Copilot CLI on PATH.
Agent plugins and skill catalogs
Section titled “Agent plugins and skill catalogs”With no skillSources setting, the CLI adds the microsoft/aspire-skills marketplace and enables the aspire plugin in GitHub Copilot and Claude Code settings. For OpenCode, it adds the Aspire catalog to the skills setting. Each agent downloads and loads its plugins or skills.
When skillSources is configured, selecting aspire applies all enabled sources. Adding custom sources doesn’t exclude the built-in default source. To exclude it, set skillSources.default.enabled to false. Selecting aspire respects that exclusion.
For the workflow skills and setup details, see Aspire skills.
Aspire MCP server
Section titled “Aspire MCP server”The optional MCP server gives your AI agent direct runtime access to your running Aspire application — resource status, logs, traces, and commands. CLI skills can already query runtime data without MCP. See Aspire MCP server for configuration details, available tools, and the security model.
Control and debug AppHosts through VS Code
Section titled “Control and debug AppHosts through VS Code”With the Aspire VS Code extension, agents can use #aspireStartAppHost and #aspireStopAppHost to control a discovered AppHost through the editor. Start supports run and debug modes, and both tools require a trusted workspace and user confirmation. It also provides tools to attach a debugger to a Go or C# resource, check AppHost and resource status, explain launch failures, check whether C# Hot Reload is enabled, and open the dashboard or VS Code output panel.
Use #aspireStartAppHost to start my AppHost in debug mode, then inspect the resource status.
The start tool can also select a launch profile or request isolated ports and user secrets. When the agent omits the isolation choice, linked Git worktrees start isolated automatically to avoid conflicts with the primary checkout.
The extension checks for an existing AppHost session before launching, so the agent doesn’t need to start a second CLI process. The VS Code extension tools are separate from the optional runtime MCP tools. Both can inspect resources, but MCP tools also provide access to app telemetry. If a tool is unavailable for certain data or functionality, prefer CLI invocation when possible over MCP.
Use the Aspire CLI workflow when your agent runs outside VS Code or doesn’t have access to the extension’s tools.
Migrate from AGENTS.md
Section titled “Migrate from AGENTS.md”If AGENTS.md contains generated Aspire guidance, switch to the plugin’s workflow skills:
-
Run
aspire agent init, select your agents, and chooseaspire. -
Review local Aspire skill files. Remove duplicate copies unless you intend to override plugin guidance.
-
Keep project-specific instructions in
AGENTS.mdand remove duplicated Aspire guidance.
Your first prompts
Section titled “Your first prompts”Once configured, start your preferred AI coding environment. Try asking your agent:
“Start the Aspire app and show me the resource status.”
“Analyze HTTP request performance for my API.”
“Investigate this failed request using its trace ID and correlated logs. After the fix, repeat the request and verify the response and new trace.”
“Add a Redis cache to my AppHost.”
For a worked investigation using the same evidence in the dashboard and CLI, see Debug application failures with AI coding agents. Passing resource health checks alone doesn’t prove that a failing request is fixed.
Supported AI assistants
Section titled “Supported AI assistants”The aspire agent init command supports the following AI assistants:
- VS Code with GitHub Copilot
- Copilot CLI
- Claude Code
- OpenCode
See also
Section titled “See also”- Aspire skills — skill installation and contents
- Aspire MCP server — tools, security, and troubleshooting for the MCP server
- Resource MCP servers — optional resource-specific tools
- aspire agent command
- aspire agent init command
- aspire agent mcp command
- Dashboard security considerations
- Dashboard and AI coding agents
- Agentic dev aspirations — background on Aspire’s agent-friendly development model