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

# Coding Agents

> Delegate coding tasks to Claude Code, Cursor, and Devin

export const Prompt = ({text, variant = 'accent'}) => {
  const [copied, setCopied] = useState(false);
  const handleCopy = async () => {
    try {
      await navigator.clipboard.writeText(text);
      setCopied(true);
      setTimeout(() => setCopied(false), 2000);
    } catch {}
  };
  const clipboardIcon = <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
            <title>Copy</title>
            <rect x="9" y="9" width="13" height="13" rx="2" ry="2" />
            <path d="M5 15H4a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h9a2 2 0 0 1 2 2v1" />
        </svg>;
  const checkIcon = <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round">
            <title>Copied</title>
            <polyline points="20 6 9 17 4 12" />
        </svg>;
  const promptIcon = <svg width="16" height="16" viewBox="0 0 24 24" fill="currentColor" style={{
    flexShrink: 0,
    opacity: 0.4
  }}>
            <title>Prompt</title>
            <path d="M20 2H2v20h2V4h16v12H6v2H4v2h2v-2h16V2zM6 7h12v2H6zm8 4H6v2h8z" />
        </svg>;
  return <div className={`prompt prompt-${variant}`} style={{
    marginTop: '12px',
    marginBottom: '12px'
  }}>
            {promptIcon}
            <span className="prompt-text">{text}</span>
            <button className="prompt-copy" onClick={handleCopy} title="Copy to clipboard" type="button">
                {copied ? checkIcon : clipboardIcon}
            </button>
        </div>;
};

Coding agents let you delegate implementation tasks to external AI coding tools directly from the Modem Agent. Instead of switching between Modem and your coding tool, you describe what needs to be built and the agent handles the handoff. You can invoke coding agents from the dashboard (full-screen or sidebar) or from Slack.

Modem currently supports **Claude Code** (via Anthropic managed agents), **Cursor** (via Cloud Agents), and **Devin**.

## How It Works

1. You ask the Modem Agent to implement something (e.g., "fix the login timeout bug").
2. Before delegating, the agent queries your Modem data for relevant context: bug reports, user feedback, error patterns, affected user counts.
3. The agent composes a task description enriched with that context and sends it to Claude Code, Cursor, or Devin.
4. You approve the action (all coding agent tasks require confirmation before executing).
5. The coding agent works asynchronously. You can check on progress through the Modem Agent.

<Info>
  Task descriptions are sent to the selected coding agent's servers (Anthropic, Cursor, or Devin). Only context relevant to the task is
  included.
</Info>

## Prerequisites

* A Modem organization with the [GitHub integration](/integrations/github) connected for repository-backed coding tasks
* An Anthropic API key for Claude Code, a Cursor API key for Cursor, or a Devin API key for Devin
* Admin access in Modem to configure Claude Code for the organization

## Setup

Claude Code is configured once for the organization. Cursor and Devin are configured per user. API keys are stored encrypted.

<Steps>
  <Step title="Connect GitHub for repository work">
    Go to **Settings** > **Integrations** > **GitHub** and connect the repositories you want coding agents to work on.
  </Step>

  <Step title="Configure Claude Code">
    Go to **Settings** > **Integrations** > **Claude Code** and connect your organization's Anthropic API key. Modem validates the key
    before saving it. If Claude Code does not appear in your integrations list, your organization may not be enabled for it yet.
  </Step>

  <Step title="Configure Cursor or Devin">
    Click your avatar in the bottom-left corner of the dashboard, then click **Profile**. Scroll to **Coding Integrations**, add your
    Cursor or Devin API key, and click **Save**.
  </Step>

  <Step title="Start delegating tasks">
    Open the Modem Agent (full-screen or sidebar) and ask it to implement something with Claude Code, Cursor, or Devin.
  </Step>
</Steps>

## Claude Code

Claude Code managed agents run on Anthropic's infrastructure. They can read and write files, run shell commands, browse the web, and create pull requests.

### Getting your Anthropic API key

1. Open the [Anthropic Console](https://console.anthropic.com)
2. Create or copy an API key from an account with Claude Code managed agents enabled
3. Paste the key into **Settings** > **Integrations** > **Claude Code** in Modem

Claude Code uses one organization-level Anthropic API key. Any organization member can ask the Modem Agent to delegate work to Claude Code after an admin connects the key. All Claude Code API usage is billed to the connected Anthropic account.

### What Claude Code can do

* Implement features and fix bugs in connected GitHub repositories
* Create pull requests with the changes
* Run commands, inspect files, and investigate code paths
* Target a specific repository and branch
* Accept follow-up messages during an active session

### Example prompts

<Prompt text="Ask Claude Code to fix the export timeout bug in our dashboard" />

<Prompt text="Ask Claude Code to investigate why OAuth callbacks fail in staging" />

<Prompt text="Send a follow-up to the Claude Code session: add a regression test before opening the PR" />

### Checking session status

<Prompt text="What's the status of my Claude Code session?" />

The agent returns the session status, timing and token usage when available, and a session ID you can use for follow-up messages.

## Cursor

Cursor's [Cloud Agents](https://cursor.com/docs/cloud-agent) run on Cursor's infrastructure. They can implement features, fix bugs, create pull requests, and investigate codebases.

### Getting your Cursor API key

1. Open [Cursor Dashboard → Integrations](https://cursor.com/dashboard?tab=integrations)
2. Generate a new API key
3. Copy the key and paste it into Modem's **Coding Integrations** section

### What Cursor can do

* Implement features and fix bugs across your connected GitHub repositories
* Create pull requests with the changes
* Investigate codebases: read source code, trace execution paths, audit implementations
* Target a specific repository and branch

### Example prompts

<Prompt text="Ask Cursor to fix the login timeout bug in our auth service" />

<Prompt text="Ask Cursor to investigate how the payment flow works and report back" />

<Prompt text="Ask Cursor to add rate limiting to the /api/users endpoint" />

### Checking task status

After triggering a Cursor task, you can ask the agent to check on it:

<Prompt text="What's the status of the Cursor task I just started?" />

The agent will return the current status, a summary of work done, and a link to the pull request if one was created.

## Devin

[Devin](https://devin.ai) is an autonomous AI software engineer that handles complex, multi-step implementation tasks. Devin sessions run asynchronously and you can send follow-up messages to provide additional context or redirect its focus.

### Getting your Devin API key

1. Open your [Devin dashboard settings](https://app.devin.ai/settings)
2. Navigate to the API keys section
3. Generate a new API key
4. Copy the key and paste it into Modem's **Coding Integrations** section

### What Devin can do

* Handle multi-step implementation tasks across multiple files and repositories
* Create pull requests with the changes
* Investigate codebases: map architecture, audit implementations, report findings
* Accept follow-up messages during an active session

### Example prompts

<Prompt text="Ask Devin to refactor our notification system to support email and Slack" />

<Prompt text="Ask Devin to add comprehensive test coverage for the billing module" />

<Prompt text="Send a follow-up to the Devin session: focus on the webhook handler first" />

### Checking session status

<Prompt text="What's the status of my Devin session?" />

The agent returns the session status, recent messages, and a link to the pull request if one exists. You can also view the session directly on the Devin dashboard.

## Context Enrichment

When you ask the agent to delegate a coding task, it automatically considers whether your Modem data can inform the work. For example:

* "Fix the login timeout bug" -- the agent queries topics and discussions about login timeouts first, then includes error reports, reproduction details, and user impact in the task description.
* "Address the top complaints from this week" -- the agent finds the most-reported issues and provides the coding agent with specific details.

If Modem data reveals ambiguity (e.g., multiple distinct issues matching your description), the agent asks you to clarify before delegating.

You can also skip this by providing full context yourself. The agent only enriches when it would add value.

## Troubleshooting

<AccordionGroup>
  <Accordion title="Agent says API key is not configured">
    For Claude Code, ask an admin to go to **Settings** > **Integrations** > **Claude Code** and verify the Anthropic API key is connected.
    For Cursor or Devin, go to **Profile** > **Coding Integrations** and verify your key is saved and active.
  </Accordion>

  <Accordion title="API key validation fails">
    Make sure you copied the full key. For Claude Code, create the key in the
    [Anthropic Console](https://console.anthropic.com) from an account with Claude Code managed agents enabled. If validation still fails,
    check that managed agents are available for the Anthropic workspace. For Cursor, generate a new key at
    [Cursor Dashboard → Integrations](https://cursor.com/dashboard?tab=integrations). For Devin, generate a new key from your Devin
    dashboard settings.
  </Accordion>

  <Accordion title="Task was triggered but nothing happened">
    Check the task status through the agent. Coding agent tasks run asynchronously and may take a few minutes to start. If the status shows an
    error, the coding agent may have encountered an issue with repository access or permissions.
  </Accordion>

  <Accordion title="Coding agent can't access my repository">
    Make sure the repository is connected through Modem's [GitHub integration](/integrations/github). The coding agent can only target repositories that Modem has access to.
  </Accordion>
</AccordionGroup>

## Related

<CardGroup cols={2}>
  <Card title="The Modem Agent" icon="https://mintcdn.com/modem-844d7a4a/Wr2r4IRr97lNQiQb/icons/bot-bolt.svg?fit=max&auto=format&n=Wr2r4IRr97lNQiQb&q=85&s=dda761a2f7042ebc27c668cc644df76c" href="/features/agent" width="22" height="22" data-path="icons/bot-bolt.svg">
    Learn about the full capabilities of the Modem Agent.
  </Card>

  <Card title="GitHub" icon="https://mintcdn.com/modem-844d7a4a/Wr2r4IRr97lNQiQb/icons/github.svg?fit=max&auto=format&n=Wr2r4IRr97lNQiQb&q=85&s=1241c26b449c582e802cf990e2f41703" href="/integrations/github" width="24" height="24" data-path="icons/github.svg">
    Connect GitHub repositories for coding agents to work on.
  </Card>
</CardGroup>
