# Custom Agents

import { Callout } from "nextra/components";

Pane is agent-agnostic. Any CLI tool you can run in a terminal, you can run as a custom command.

<TerminalPreview
  title="Terminal"
  lines={[
    { type: "command", text: "your-agent --flag" },
    { type: "output", text: "Agent started..." },
    { type: "output", text: "Reading project files..." },
    { type: "success", text: "✓ Task complete" },
  ]}
/>

## Add a Custom Command

1. Click the **+** in the tab bar to open **Add Tool**.
2. Choose **Add Custom Command…**.
3. Type any command, like `aider`, `gh copilot`, or `npm run dev`.
4. Press **Enter**. Pane saves the command and launches it right away.

Pane names the tab from the first few words of your command. The first four custom commands you add each get a hotkey, <KeyCombo keys={["⌘", "⌥", "6"]} /> through <KeyCombo keys={["⌘", "⌥", "9"]} /> on macOS, <KeyCombo keys={["Ctrl", "Alt", "6"]} /> through <KeyCombo keys={["Ctrl", "Alt", "9"]} /> on Windows and Linux. Click the X next to a saved command to delete it.

<Callout type="info">
  Commands run exactly as typed, in a real terminal, inside the pane's worktree. Want a custom agent to pick up its conversation after a restart? Give it a resume template, like `{command} --resume {sessionId}`. `{command}` is your command and `{sessionId}` is the conversation ID. Pane fills in the ID and quotes it for you.
</Callout>

## Any CLI Works

Pane doesn't keep an allowlist of agents. GitHub Copilot CLI, Goose, OpenCode, your own build script: add any of them as a custom command, the same way as Claude Code or Codex.

On a Windows machine with a WSL project, Pane detects `\\wsl$\` paths automatically and runs your custom command inside that WSL distro. Install the CLI there first. Run `runpane agents doctor --agent claude` (or `--agent codex`, or `--agent cursor`) to check that a built-in agent is reachable. For any other CLI, just try the command. If Pane can't find it, add its folder in **Settings → Advanced → Additional PATH**. See [Troubleshooting](/docs/troubleshooting) for more on PATH issues.

## Automating From the CLI

Agents and scripts can create panes with a custom command directly:

```bash
runpane panes create --tool-command '<cmd>'
```

For multi-step setups, wrap them in a shell:

```bash
runpane panes create --tool-command bash -lc 'npm install && npm run dev'
```

See the [runpane CLI](/docs/runpane-cli) for the rest of the command set.

## Is There a Plugin API?

No. Pane doesn't have a plugin or extension system today. What you get instead: custom commands (this page), terminal shortcuts, the `runpane` CLI, and project scripts in `pane.json`.

Pane is AGPL-3.0 open source, so you can fork it and build deeper integrations yourself. See the [Troubleshooting & FAQ](/docs/troubleshooting) page for what that license requires. File extension requests at [github.com/greenfield-inc/Pane/issues](https://github.com/greenfield-inc/Pane/issues).

## Custom Shortcuts

Custom Shortcuts are a different feature: a keyboard shortcut that pastes a saved command into the terminal without running it automatically. See [Keyboard Shortcuts](/docs/keyboard-shortcuts#terminal-shortcuts) for setup steps.
