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

# Configure custom binary paths for AI agent detection

> Configure AgentNet CLI to find agent binaries that aren't in your PATH, using set-path and clear-path to control where each agent's executable is located.

AgentNet CLI detects agents by looking for their config directories — not their binaries. If `~/.cursor/` exists, Cursor is considered installed regardless of whether the `cursor` binary is in your PATH. However, some commands (and the `detect` output) also check for the binary, and a missing binary can prevent connections from working for agents that require the CLI to invoke them (such as Claude Code, which uses `claude plugin` commands).

When an agent's binary isn't in your PATH, `agentnet detect` shows a warning:

```text theme={null}
Agent              Status          Binary
Claude Code        ● ready         not in PATH
```

The CLI also prints a hint:

```text theme={null}
  ! Binary not in PATH: Claude Code
    Run agentnet set-path <agent> <path> to set a custom location
```

Use `agentnet set-path` to tell AgentNet CLI exactly where to find the binary.

## Setting a custom path

```bash theme={null}
agentnet set-path <agent> <path>
```

`<agent>` is one of: `claude`, `cursor`, `copilot`, `vscode`, `codex`, `hermes`, `openclaw`.\
`<path>` is the path to the agent's executable. Tilde expansion is supported.

<Tabs>
  <Tab title="Linux">
    ```bash theme={null}
    # Binary installed to ~/.local/bin
    agentnet set-path claude ~/.local/bin/claude

    # Binary installed via a custom prefix
    agentnet set-path cursor /opt/cursor/cursor

    # VS Code binary (the executable is named "code")
    agentnet set-path vscode ~/.local/bin/code
    ```
  </Tab>

  <Tab title="macOS">
    ```bash theme={null}
    # Claude Code installed via Homebrew
    agentnet set-path claude /opt/homebrew/bin/claude

    # Cursor installed as an app bundle
    agentnet set-path cursor /Applications/Cursor.app/Contents/MacOS/Cursor

    # VS Code from the app bundle
    agentnet set-path vscode "/Applications/Visual Studio Code.app/Contents/Resources/app/bin/code"
    ```
  </Tab>

  <Tab title="Windows">
    ```bash theme={null}
    # Claude Code in AppData
    agentnet set-path claude "C:\Users\you\AppData\Local\Programs\claude\claude.exe"

    # VS Code default install location
    agentnet set-path vscode "C:\Users\you\AppData\Local\Programs\Microsoft VS Code\bin\code.cmd"
    ```
  </Tab>
</Tabs>

After running `set-path`, the CLI confirms the change:

```text theme={null}
✓ Claude Code binary path set to /home/you/.local/bin/claude
```

<Note>
  If the path you provide does not exist at the time you run `set-path`, the CLI saves it anyway with a warning. This lets you pre-configure a path before an agent is installed. You can update it later by running `set-path` again.
</Note>

## How paths are stored

Custom paths are saved in `~/.agentnet/config.json` under an `agent_paths` key. The file already stores your platform credentials, so paths land in the same place:

```json theme={null}
{
  "api_token": "...",
  "agent_paths": {
    "claude": "/home/you/.local/bin/claude",
    "cursor": "/opt/cursor/cursor"
  }
}
```

The file has `0600` permissions (owner read/write only). You can inspect or edit it directly, but using `set-path` and `clear-path` is safer.

## Clearing a custom path

To revert an agent to auto-detection (looking for the binary in your PATH via `which`):

```bash theme={null}
agentnet clear-path <agent>
```

For example:

```bash theme={null}
agentnet clear-path claude
```

Output:

```text theme={null}
✓ Cleared custom path for Claude Code
```

If no custom path was set, the command exits silently:

```text theme={null}
No custom path set for Claude Code
```

## Verifying the result

Run `agentnet detect` after setting a path to confirm the binary is now found:

```bash theme={null}
agentnet detect
```

If the path is correct, the Binary column changes from `not in PATH` to the resolved path:

```text theme={null}
Agent              Status          Binary
Claude Code        ● ready         ~/.local/bin/claude
```

<Tip>
  If you reinstall an agent to a different location, run `agentnet set-path` again with the new path. The old value is replaced, not appended.
</Tip>

## Command reference

| Command                            | Description                                         |
| ---------------------------------- | --------------------------------------------------- |
| `agentnet set-path <agent> <path>` | Save a custom binary path for the given agent       |
| `agentnet clear-path <agent>`      | Remove the custom path and revert to auto-detection |
| `agentnet detect`                  | Re-scan agents and show updated binary status       |
