---
title: "Coder Agents | Coder"
description: "Self-hosted agentic coding, built into the control plane"
image: "https://coder.com/og/explore/how-coder-works/coder-agents"
canonical: "https://coder.com/explore/how-coder-works/coder-agents"
---

[Coder provides](https://coder.com/explore/how-coder-works)

# Coder Agents

Self-hosted agentic coding, built into the control plane

## Opportunity and risk

Full autonomy, full control

### Opportunity

A native AI coding agent that provisions workspaces and executes long-running development tasks on your infrastructure, without sending source code through third-party SaaS or installing agent software in every workspace.

Sprawl & opacity

### Risk

Third-party agent tools require API keys in every workspace, network egress to model providers, and bespoke install logic per agent. Operations and security teams lose visibility into prompts, costs, and tool usage.

## How Coder helps

**Intelligence lives in the control plane:** The workspace is plain compute. No special software, no LLM keys, no outbound model access required. The agent connects to workspaces only when it needs to read code, run commands, or make edits.

- **Enabled:** Self-hosted agent loop
- **Enabled:** Centralized LLM credentials
- **Enabled:** On-demand workspaces

## Built-in capabilities

**One agent, any model:** Coder Agents includes a native, governed agent that works consistently across any LLM provider you configure, with centralized control over models, prompts, tools, and execution.

### Chat interface

Dashboard-native chat for delegating work to the agent

### Automation support

Trigger long-running agent workflows through CI pipelines, GitHub Actions, Slack, or other integrations

### Remote execution

Agents continue running on persistent infrastructure after developers close their laptops

### Plan mode

Agent proposes a Markdown plan and asks structured clarifying questions before executing

### Sub-agents

Root agent spawns parallel child agents with isolated context windows

### Automatic workspace selection

Agent reads template descriptions and picks the right environment for the task

### Git diff integrations

Review code changes, inspect diffs, and provide feedback directly within the workflow

### Chat persistence

Full conversation history stored in the Coder database, independent of workspace lifecycle

### Message queuing

Send follow-up messages while the agent is working; they're delivered at the next step

### Image attachments

Paste screenshots of errors, mockups, or terminal output

## Platform controls

**Server-side enforcement:** Models, system prompts, spend limits, and tool permissions are configured in the control plane. Developers cannot override them locally.

### Coder AI Gateway integration

Govern model usage, audit prompts, and observe agent tool calls

### MCP server controls

Centrally configure and restrict which MCP servers agents can access across the organization

### Agent skills

Define shared agent skills centrally while still allowing developers to configure personal skills independently

### Spend limits

Per-user, per-group, or organization-wide budgets with inline usage indicators and automatic pause on overage

### Cost analytics

Admin dashboard tracks spend, model usage, and trends over time

### System prompt overrides

Prepend or replace the default agent system instructions at the deployment level

### Compaction thresholds

Per-user, per-model context compaction settings

### Template allowlist

Restrict which templates the agent can provision

Model flexibility

## Choose how Coder Agents access LLMs. Coder supports external LLM providers, model brokers, and OpenAI-compatible self-hosted models.

Easiest setup

### External LLM providers

Connect directly to Anthropic, OpenAI, Google, Azure OpenAI, or AWS Bedrock. Credentials live in the control plane.

Most flexible

### Model brokers

Point at any OpenAI-compatible API: OpenRouter, Vercel AI Gateway, internal proxies, or model brokers.

Maximum sovereignty

### Self-hosted models

Run self-hosted models through OpenAI-compatible endpoints like vLLM or Ollama on your own infrastructure. No data leaves your network.

## Patterns

Most common

### Conversational delegation

Developer describes work in the chat. Agent plans, provisions a workspace if needed, and executes.

- Plan mode review before execution
- Developer can intervene at any step
- Changes can be reviewed and pushed to Git

Advanced

### Headless API automation

Trigger agents programmatically via the Chats API for CI/CD, scheduled jobs, or bulk operations.

- No human in the loop
- Service-account identity
- Cost and audit attribution preserved

FAQs

## FAQs

### How is Coder Agents different from running Claude Code or Cursor in a workspace?

Coder Agents runs in the control plane, not the workspace. There are no API keys, no agent software, and no LLM network access required inside your workspaces. Third-party agents like Claude Code and Cursor still work in Coder — they're covered by the Third-Party AI Agents path — while Coder Agents is a native option with deeper platform integration.

### Does Coder Agents replace Claude Code or Cursor?

No. You can run both side by side. Many teams use Coder Agents for delegated, autonomous work and third-party agents like Claude Code or Cursor for in-IDE pair programming.

### Can the agent access other users' workspaces?

No. The agent operates with the exact permissions of the user who submitted the prompt. No privilege escalation, no shared service accounts.

### What if a workspace is deleted mid-conversation?

Chat state lives in the database. The agent can create a new workspace from the same template and resume from the last known state (e.g., a git branch).

### Can we use our own models?

Yes. Any OpenAI-compatible endpoint, self-hosted inference server, or enterprise LLM proxy works.

## Ready to learn more?

[Try Open Source](https://coder.com/docs/install)

[Book a demo](https://coder.com/demo) [Contact sales](https://coder.com/contact/sales)
