- Notifications
You must be signed in to change notification settings - Fork913
docs: add tutorials for using early access AI agent features#17186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
Merged
Changes fromall commits
Commits
Show all changes
14 commits Select commitHold shift + click to select a range
a6dee7b
feat(docs): add AI agents tutorial and related resources
bpmct81b47aa
more docs
bpmctf8aabc9
fix(docs): update contact link phrasing in AI agents tutorials
bpmct9fc1f32
fix URL
bpmct6764289
fix 404s
bpmctd05fe7e
fix title
bpmctd3300d6
fmt
bpmct188098d
fix typos
bpmct79f3fc9
fmt
bpmct02ec13b
add goose icon
bpmct2580d95
fix typos
bpmct17add3d
fmt
bpmct8bf609a
push
bpmct886cac6
kirby fixes
bpmctFile filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Binary file addeddocs/images/guides/ai-agents/duplicate.png
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file addeddocs/images/guides/ai-agents/github-action.png
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file addeddocs/images/guides/ai-agents/github-pr.png
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file addeddocs/images/guides/ai-agents/ide-integration.png
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file addeddocs/images/guides/ai-agents/landing.png
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file addeddocs/images/guides/ai-agents/workspace-details.png
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file addeddocs/images/guides/ai-agents/workspaces-list.png
Loading
Sorry, something went wrong.Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
54 changes: 54 additions & 0 deletionsdocs/manifest.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
36 changes: 36 additions & 0 deletionsdocs/tutorials/ai-agents/README.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Run AI Agents in Coder (Early Access) | ||
> [!NOTE] | ||
> | ||
> This functionality is in early access and subject to change. Do not run in | ||
> production as it is unstable. Instead, deploy these changes into a demo or | ||
> staging environment. | ||
> | ||
> Join our [Discord channel](https://discord.gg/coder) or | ||
> [contact us](https://coder.com/contact) to get help or share feedback. | ||
AI Coding Agents such as [Claude Code](https://docs.anthropic.com/en/docs/agents-and-tools/claude-code/overview), [Goose](https://block.github.io/goose/), and [Aider](https://github.com/paul-gauthier/aider) are becoming increasingly popular for: | ||
- Protyping web applications or landing pages | ||
- Researching / onboarding to a codebase | ||
- Assisting with lightweight refactors | ||
- Writing tests and documentation | ||
- Small, well-defined chores | ||
With Coder, you can self-host AI agents in isolated development environments with proper context and tooling around your existing developer workflows. Whether you are a regulated enterprise or an individual developer, running AI agents at scale with Coder is much more productive and secure than running them locally. | ||
 | ||
## Prerequisites | ||
Coder is free and open source for developers, with a [premium plan](https://coder.com/pricing) for enterprises. You can self-host a Coder deployment in your own cloud provider. | ||
- A [Coder deployment](../../install/) with v2.21.0 or later | ||
- A Coder [template](../../admin/templates/) for your project(s). | ||
- Access to at least one ML model (e.g. Anthropic Claude, Google Gemini, OpenAI) | ||
- Cloud Model Providers (AWS Bedrock, GCP Vertex AI, Azure OpenAI) are supported with some agents | ||
- Self-hosted models (e.g. llama3) and AI proxies (OpenRouter) are supported with some agents | ||
## Table of Contents | ||
<children></children> |
55 changes: 55 additions & 0 deletionsdocs/tutorials/ai-agents/agents.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Coding Agents | ||
> [!NOTE] | ||
> | ||
> This page is not exhaustive and the landscape is evolving rapidly. Please | ||
> [open an issue](https://github.com/coder/coder/issues/new) or submit a pull | ||
> request if you'd like to see your favorite agent added or updated. | ||
There are several types of coding agents emerging: | ||
- **Headless agents** can run without an IDE open and are great for rapid | ||
prototyping, background tasks, and chat-based supervision. | ||
- **In-IDE agents** require developers keep their IDE opens and are great for | ||
interactive, focused coding on more complex tasks. | ||
## Headless agents | ||
Headless agents can run without an IDE open, or alongside any IDE. They | ||
typically run as CLI commands or web apps. With Coder, developers can interact | ||
with agents via any preferred tool such as via PR comments, within the IDE, | ||
inside the Coder UI, or even via the REST API or an MCP client such as Claude | ||
Desktop or Cursor. | ||
| Agent | Supported Models | Coder Support | Limitations | | ||
|---------------|---------------------------------------------------------|---------------------------|---------------------------------------------------------| | ||
| Claude Code ⭐ | Anthropic Models Only (+ AWS Bedrock and GCP Vertex AI) | First class integration ✅ | Beta (research preview) | | ||
| Goose | Most popular AI models + gateways | First class integration ✅ | Less effective compared to Claude Code | | ||
| Aider | Most popular AI models + gateways | In progress ⏳ | Can only run 1-2 defined commands (e.g. build and test) | | ||
| OpenHands | Most popular AI models + gateways | In progress ⏳ ⏳ | Challenging setup, no MCP support | | ||
[Claude Code](https://github.com/anthropics/claude-code) is our recommended | ||
coding agent due to its strong performance on complex programming tasks. | ||
> Note: Any agent can run in a Coder workspace via our | ||
> [MCP integration](./headless.md). | ||
## In-IDE agents | ||
Coding agents can also run within an IDE, such as VS Code, Cursor or Windsurf. | ||
These editors and extensions are fully supported in Coder and work well for more | ||
complex and focused tasks where an IDE is strictly required. | ||
| Agent | Supported Models | Coder Support | | ||
|-----------------------------|-----------------------------------|--------------------------------------------------------------| | ||
| Cursor (Agent Mode) | Most popular AI models + gateways | ✅ [Cursor Module](https://registry.coder.com/modules/cursor) | | ||
| Windsurf (Agents and Flows) | Most popular AI models + gateways | ✅ via Remote SSH | | ||
| Cline | Most popular AI models + gateways | ✅ via VS Code Extension | | ||
In-IDE agents do not require a special template as they are not used in a | ||
headless fashion. However, they can still be run in isolated Coder workspaces | ||
and report activity to the Coder UI. | ||
## Next Steps | ||
- [Create a Coder template for agents](./create-template.md) |
68 changes: 68 additions & 0 deletionsdocs/tutorials/ai-agents/best-practices.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
# Best Practices & Adding Tools via MCP | ||
> [!NOTE] | ||
> | ||
> This functionality is in early access and subject to change. Do not run in | ||
> production as it is unstable. Instead, deploy these changes into a demo or | ||
> staging environment. | ||
> | ||
> Join our [Discord channel](https://discord.gg/coder) or | ||
> [contact us](https://coder.com/contact) to get help or share feedback. | ||
## Overview | ||
Coder templates should be pre-equipped with the tools and dependencies needed | ||
for development. With AI Agents, this is no exception. | ||
## Prerequisites | ||
- A Coder deployment with v2.21 or later | ||
- A [template configured for AI agents](./create-template.md) | ||
## Best Practices | ||
- Since agents are still early, it is best to use the most capable ML models you | ||
have access to in order to evaluate their performance. | ||
- Set a system prompt with the `AI_SYSTEM_PROMPT` environment in your template | ||
- Within your repositories, write a `.cursorrules`, `CLAUDE.md` or similar file | ||
to guide the agent's behavior. | ||
- To read issue descriptions or pull request comments, install the proper CLI | ||
(e.g. `gh`) in your image/template. | ||
- Ensure your [template](./create-template.md) is truly pre-configured for | ||
development without manual intervention (e.g. repos are cloned, dependencies | ||
are built, secrets are added/mocked, etc.) | ||
> Note: [External authentication](../../admin/external-auth.md) can be helpful | ||
> to authenticate with third-party services such as GitHub or JFrog. | ||
- Give your agent the proper tools via MCP to interact with your codebase and | ||
related services. | ||
- Read our recommendations on [securing agents](./securing.md) to avoid | ||
surprises. | ||
## Adding Tools via MCP | ||
Model Context Protocol (MCP) is an emerging standard for adding tools to your | ||
agents. | ||
Follow the documentation for your [agent](./agents.md) to learn how to configure | ||
MCP servers. See | ||
[modelcontextprotocol/servers](https://github.com/modelcontextprotocol/servers) | ||
to browse open source MCP servers. | ||
### Our Favorite MCP Servers | ||
In internal testing, we have seen significant improvements in agent performance | ||
when these tools are added via MCP. | ||
- [Playwright](https://github.com/microsoft/playwright-mcp): Instruct your agent | ||
to open a browser, and check its work by viewing output and taking | ||
screenshots. | ||
- [desktop-commander](https://github.com/wonderwhy-er/DesktopCommanderMCP): | ||
Instruct your agent to run long-running tasks (e.g. `npm run dev`) in the | ||
background instead of blocking the main thread. | ||
## Next Steps | ||
- [Supervise Agents in the UI](./coder-dashboard.md) | ||
- [Supervise Agents in the IDE](./ide-integration.md) | ||
- [Supervise Agents Programmatically](./headless.md) | ||
- [Securing Agents](./securing.md) |
28 changes: 28 additions & 0 deletionsdocs/tutorials/ai-agents/coder-dashboard.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
> [!NOTE] | ||
> | ||
> This functionality is in early access and subject to change. Do not run in | ||
> production as it is unstable. Instead, deploy these changes into a demo or | ||
> staging environment. | ||
> | ||
> Join our [Discord channel](https://discord.gg/coder) or | ||
> [contact us](https://coder.com/contact) to get help or share feedback. | ||
## Prerequisites | ||
- A Coder deployment with v2.21 or later | ||
- A [template configured for AI agents](./create-template.md) | ||
## Overview | ||
Once you have an agent running and reporting activity to Coder, you can view | ||
status and switch between workspaces from the Coder dashboard. | ||
 | ||
 | ||
## Next Steps | ||
- [Supervise Agents in the IDE](./ide-integration.md) | ||
- [Supervise Agents Programmatically](./headless.md) | ||
- [Securing Agents](./securing.md) |
57 changes: 57 additions & 0 deletionsdocs/tutorials/ai-agents/create-template.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
# Create a Coder template for agents | ||
> [!NOTE] | ||
> | ||
> This functionality is in early access and subject to change. Do not run in | ||
> production as it is unstable. Instead, deploy these changes into a demo or | ||
> staging environment. | ||
> | ||
> Join our [Discord channel](https://discord.gg/coder) or | ||
> [contact us](https://coder.com/contact) to get help or share feedback. | ||
## Overview | ||
This tutorial will guide you through the process of creating a Coder template | ||
for agents. | ||
## Prerequisites | ||
- A Coder deployment with v2.21 or later | ||
- A template that is pre-configured for your projects | ||
- You have selected an [agent](./agents.md) based on your needs | ||
## 1. Duplicate an existing template | ||
It is best to create a separate template for AI agents based on an existing | ||
template that has all of the tools and dependencies installed. | ||
This can be done in the Coder UI: | ||
 | ||
## 2. Add a module for supported agents | ||
We currently publish a module for Claude Code and Goose. Additional modules are | ||
[coming soon](./agents.md). | ||
- [Add the Claude Code module](https://registry.coder.com/modules/claude-code) | ||
- [Add the Goose module](https://registry.coder.com/modules/goose) | ||
Follow the instructions in the Coder Registry to install the module. Be sure to | ||
enable the `experiment_use_screen` and `experiment_report_tasks` variables to | ||
report status back to the Coder control plane. | ||
> Alternatively, you can report status from a custom agent back to the Coder | ||
> control plane via our MCP server. For more information, | ||
> [join our Discord](https://discord.gg/coder) or | ||
> [contact us](https://coder.com/contact). | ||
## 3. Confirm tasks are streaming in the Coder UI | ||
The Coder dashboard should now show tasks being reported by the agent. | ||
 | ||
## Next Steps | ||
- [Integrate with your issue tracker](./issue-tracker.md) |
54 changes: 54 additions & 0 deletionsdocs/tutorials/ai-agents/headless.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
> [!NOTE] | ||
> | ||
> This functionality is in early access and subject to change. Do not run in | ||
> production as it is unstable. Instead, deploy these changes into a demo or | ||
> staging environment. | ||
> | ||
> Join our [Discord channel](https://discord.gg/coder) or | ||
> [contact us](https://coder.com/contact) to get help or share feedback. | ||
## Prerequisites | ||
- A Coder deployment with v2.21 or later | ||
- A [template configured for AI agents](./create-template.md) | ||
## Overview | ||
Once you have an agent running and reporting activity to Coder, you can manage | ||
it programmatically via the MCP server, Coder CLI, and/or REST API. | ||
## MCP Server | ||
Power users can configure [Claude Desktop](https://claude.ai/download), Cursor, | ||
or other tools with MCP support to interact with Coder in order to: | ||
- List workspaces | ||
- Create/start/stop workspaces | ||
- Run commands on workspaces | ||
- Check in on agent activity | ||
In this model, an [IDE Agent](./agents.md#in-ide-agents) could interact with a | ||
remote Coder workspace, or Coder can be used in a remote pipeline or a larger | ||
workflow. | ||
The Coder CLI has options to automatically configure MCP servers for you. On | ||
your local machine, run the following command: | ||
```sh | ||
coder mcp claude-desktop # Configure Claude Desktop to interact with Coder | ||
coder mcp cursor # Configure Cursor to interact with Coder | ||
``` | ||
## Coder CLI | ||
Workspaces can be created, started, and stopped via the Coder CLI. See the | ||
[CLI docs](../../reference/cli/) for more information. | ||
## REST API | ||
The Coder REST API can be used to manage workspaces and agents. See the | ||
[API docs](../../reference/api/) for more information. | ||
## Next Steps | ||
- [Securing Agents](./securing.md) |
29 changes: 29 additions & 0 deletionsdocs/tutorials/ai-agents/ide-integration.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
> [!NOTE] | ||
> | ||
> This functionality is in early access and subject to change. Do not run in | ||
> production as it is unstable. Instead, deploy these changes into a demo or | ||
> staging environment. | ||
> | ||
> Join our [Discord channel](https://discord.gg/coder) or | ||
> [contact us](https://coder.com/contact) to get help or share feedback. | ||
## Prerequisites | ||
- A Coder deployment with v2.21 or later | ||
bpmct marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. | ||
- A [template configured for AI agents](./create-template.md) | ||
- VS Code, Windsurf, or Cursor IDE with the | ||
[Coder Extension](https://github.com/coder/vscode-coder/releases) v1.6.0+ or | ||
the [experimental AI VSIX](https://github.com/coder/vscode-coder/releases/) | ||
## Overview | ||
Once you have an agent running and reporting activity to Coder, you can view the | ||
status and switch between workspaces from the IDE. This can be very helpful for | ||
reviewing code, working along with the agent, and more. | ||
 | ||
## Next Steps | ||
- [Programmatically manage agents](./headless.md) | ||
- [Securing Agents with Boundaries](./securing.md) | ||
bpmct marked this conversation as resolved. Show resolvedHide resolvedUh oh!There was an error while loading.Please reload this page. |
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Oops, something went wrong.
Uh oh!
There was an error while loading.Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.