Use AI coding agents
Aspire provides a first-class setup experience for AI coding agents. Run aspire agent init in your project and your AI assistant — whether it’s GitHub Copilot, Claude Code, or another MCP-compatible tool — can immediately understand, build, debug, and monitor your distributed applications.
Why Aspire for coding agents
Section titled “Why Aspire for coding agents”Aspire gives coding agents the same visibility into your running application that a developer has. The resource data, structured logs, and distributed traces you see in the Aspire Dashboard are exposed to agents through the Aspire MCP server and the Aspire CLI. Whether a person is debugging in the dashboard or an agent is diagnosing through MCP, they see the same picture.
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.
The Aspire skill file (installed by aspire agent init) teaches agents all of these patterns automatically.
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 the skill locations where you want files installed. The Standard location is pre-selected by default:
Location Directory Notes Standard .agents/skills/Supported by VS Code, GitHub Copilot, and OpenCode Claude Code .claude/skills/Claude Code specific GitHub Skills .github/skills/VS Code / GitHub Copilot specific OpenCode .opencode/skill/OpenCode specific -
Select the skills and tools to install into those locations. All options are pre-selected by default:
- Aspire skill — teaches your AI agent how to use Aspire CLI commands
- Playwright CLI — enables browser automation for testing web resources
- dotnet-inspect skill — teaches your AI agent to query .NET API surfaces
What gets configured
Section titled “What gets configured”The aspire agent init command detects your AI development environment and creates the appropriate configuration files:
Aspire skill file
Section titled “Aspire skill file”The skill file teaches your AI coding agent how to work with Aspire. It includes a CLI command reference, key workflows (starting apps, debugging issues, adding integrations), and important rules to follow. The file is installed into each selected skill location:
Directory.agents/skills/aspire/
- SKILL.md Standard (VS Code, GitHub Copilot, OpenCode)
Directory.github/skills/aspire/
- SKILL.md GitHub Copilot (legacy location)
Directory.claude/skills/aspire/
- SKILL.md Claude Code
Directory.opencode/skill/aspire/
- SKILL.md OpenCode
The skill file guides your agent on how to:
- Start and manage your Aspire application (
aspire start,aspire stop,aspire describe) - Debug issues using structured logs and distributed traces
- Add integrations with
aspire addand search documentation withaspire docs - Use resource MCP tools for database queries and other resource-specific operations
dotnet-inspect skill
Section titled “dotnet-inspect skill”The dotnet-inspect skill teaches your AI agent to query .NET API surfaces using the dotnet-inspect tool. It’s installed alongside the Aspire skill in each selected location:
Directory.agents/skills/dotnet-inspect/
- SKILL.md
Directory.github/skills/dotnet-inspect/
- SKILL.md
Directory.claude/skills/dotnet-inspect/
- SKILL.md
Directory.opencode/skill/dotnet-inspect/
- SKILL.md
The skill enables your agent to inspect NuGet package API surfaces, compare API changes between package versions, and explore .NET types and members.
Aspire MCP server
Section titled “Aspire MCP server”The MCP server gives your AI agent direct runtime access to your running Aspire application — resource status, logs, traces, and commands. See Aspire MCP server for configuration details, available tools, and the security model.
Migrate from AGENTS.md
Section titled “Migrate from AGENTS.md”If your project has an AGENTS.md file from a previous version of Aspire, you can migrate to the new skill file format. The skill file provides better structure and is recognized natively by AI coding agents.
-
Run
aspire agent initand select Install Aspire skill file. -
The skill files are created at
.github/skills/aspire/SKILL.mdand.claude/skills/aspire/SKILL.md. -
Review and delete the old
AGENTS.mdfile — the skill file replaces it.
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.”
“Add a Redis cache to my AppHost.”
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 MCP server — tools, security, and troubleshooting for the MCP server
- aspire agent command
- aspire agent init command
- aspire agent mcp command
- Dashboard security considerations
- Dashboard and AI coding agents