> ## Documentation Index
> Fetch the complete documentation index at: https://docs.min-ai.ar/llms.txt
> Use this file to discover all available pages before exploring further.

# Coder

> Your agent uses the development environments of your own Coder server: it builds, runs tests and brings whole stacks up there, and tries their ports from its side.

<img src="https://mintcdn.com/min-ai/rbCRtzRXpbb-LgDL/images/plugins/coder.svg?fit=max&auto=format&n=rbCRtzRXpbb-LgDL&q=85&s=c85832198b5a22190ca5bd18f859efb6" alt="" width="56" height="56" noZoom style={{ borderRadius: '14px' }} data-path="images/plugins/coder.svg" />

[Coder](https://coder.com) is an open source platform you install on your infrastructure for remote development environments (workspaces): machines with Docker and whatever your project needs. With this plugin, your agent uses them for what it can't do in its own workspace: run containers, bring a whole stack up, build something heavy or run long tests.

| | |
| - | - |
| **Category** | Development |
| **For** | Personal and group agents |
| **What it asks for** | Your Coder server's address and a token |
| **How it connects** | With a one-time link your agent sends you |

## What it can do

* See the templates you gave it and its workspaces.
* Create, start, stop and delete workspaces (per the switch and your OK).
* Run commands in a workspace, and long jobs (installs, builds, tests) that keep going even if it pauses, while it follows them.
* Start a stopped workspace, or rebuild it if its machine is gone (say, a spot VM your cloud took back), before working.
* Bring a workspace's ports to its side to try a website or an API.
* Use your GitHub token (if the agent has the [GitHub](/en/plugins/github) plugin) to clone and push from the workspace. The workspace gets no other files from the agent: they go through git.

What each workspace has, how long it lasts and what to use it for are up to your templates and what you tell your agent.

## How it connects

<Steps>
  <Step title="Have a Coder server">
    It must be reachable over HTTPS from the internet, with at least one template. See [Coder's documentation](https://coder.com/docs).
  </Step>

  <Step title="Create a user for your agent">
    Recommended: a Coder user of the agent's own, with access only to the templates it will use. That way it doesn't see your other workspaces.
  </Step>

  <Step title="Add it to an agent">
    From **Plugins → Coder → Add to an agent**, or ask your agent in the chat. See [Add a plugin](/en/tools/add-a-plugin). Your agent asks you in the chat for the server's address, like `https://coder.yourcompany.com`, and sends you a link for the token.
  </Step>

  <Step title="Paste the token in your agent's link">
    In Coder, as the agent's user: your avatar → **Tokens** → new token. Paste it in the one-time link, not in the chat: if you paste it in the chat, it won't use it and asks you to delete it in Coder and make another. See [Keys and values](/en/tools/keys-and-values).
  </Step>

  <Step title="Your agent confirms">
    It tries the connection, tells you which user it signed in as, which templates it sees and which workspaces it has, and lets you know it's ready.
  </Step>
</Steps>

## How it keeps you safe

* **Manage workspaces** (“Create, start and stop the workspaces a task needs without asking you each time (it tells you). Deleting one, or anything bigger or longer than usual, always with your OK. Off, it asks for your OK for each one.”), off to start with: whenever it wants to create, start, resize or delete a workspace, it tells you the name, the template, the size and that it costs while it's on, with the **Confirm** and **Change** options. Stopping one never needs your OK.
* With **Manage workspaces** on, it creates, starts and stops what a task needs on its own and tells you in a line. It still asks for your OK to delete a workspace it didn't create in that task, for anything bigger than the template's largest preset and to keep one on for more than 8 hours. You change it on the Coder card, in the agent's **Tools** tab.
* **It stops what it starts** when it's done. Before stopping or deleting it checks no work is left unpushed: unless you tell it your template keeps files, it assumes stopping may lose them (and deleting always does).
* What it sees in a workspace (logs, files, pages) is data to it, not orders.
* It doesn't show your token or a workspace's secrets in the chat, and it doesn't expose a workspace's ports to the internet unless you ask.
* Your Coder server sets the real limits: templates, quotas and auto-stop. If it hits one, it tells you instead of working around it.

## Things to ask

* “Bring this repo's whole stack up in a workspace and check that sign-in works.”
* “Run the integration test suite in Coder and tell me what failed.”
* “Which of my workspaces are on?”
* “Stop everything that's on.”

## Limits

* It uses your Coder server: minai doesn't provide one.
* A workspace that's on costs whatever it costs on your infrastructure.
* The ports it brings to its side are for it alone; you open them from Coder's dashboard.

## If you remove it

Your agent loses access at once. The token is deleted from minai with the plugin; to close it completely, delete it in Coder too. Workspaces stay in your Coder until you delete them. See [Remove a plugin](/en/tools/remove-a-plugin).

<CardGroup cols={2}>
  <Card title="GitHub" icon="https://mintcdn.com/min-ai/rbCRtzRXpbb-LgDL/images/plugins/github.svg?fit=max&auto=format&n=rbCRtzRXpbb-LgDL&q=85&s=a80e8b9ebe9c01a6c7b5335778d4990b" href="/en/plugins/github" width="32" height="32" data-path="images/plugins/github.svg">
    Repos, issues and pull requests.
  </Card>

  <Card title="Google Cloud" icon="https://mintcdn.com/min-ai/rbCRtzRXpbb-LgDL/images/plugins/gcloud.svg?fit=max&auto=format&n=rbCRtzRXpbb-LgDL&q=85&s=f475a3a6a9a1ea065cdd95021e13e676" href="/en/plugins/google-cloud" width="32" height="32" data-path="images/plugins/gcloud.svg">
    Logs, Kubernetes, VMs and costs.
  </Card>
</CardGroup>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.