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

# Devin

> MCP plus native hooks for Devin CLI, and a custom MCP for cloud sessions

Devin has three surfaces and agentmemory wires two of them directly. Devin CLI runs on your machine, so it reaches the local memory server; Devin cloud sessions run on Cognition's infrastructure and need a network-reachable deployment.

## Devin CLI

<Steps>
  <Step title="Start agentmemory">
    ```bash theme={"dark"}
    npx @agentmemory/agentmemory
    ```
  </Step>

  <Step title="Wire MCP and hooks">
    ```bash theme={"dark"}
    npx @agentmemory/agentmemory connect devin --with-hooks
    ```

    The adapter merges the MCP entry into the user config and installs six native auto-capture hooks. Existing hooks in that file are preserved.
  </Step>

  <Step title="Verify">
    ```bash theme={"dark"}
    devin mcp list
    ```

    agentmemory should be listed. Inside `devin`, `/hooks` shows the loaded hooks and their source file.
  </Step>
</Steps>

### What connect installs

| Surface             | Detail                                                                                                                       |
| ------------------- | ---------------------------------------------------------------------------------------------------------------------------- |
| MCP                 | `mcpServers.agentmemory` in `~/.config/devin/config.json` (newer builds migrate it into `mcp_config.json` on startup)        |
| Hooks               | `SessionStart`, `UserPromptSubmit`, `PreToolUse`, `PostToolUse`, `Stop`, `SessionEnd`                                        |
| Tool matchers       | Devin's lowercase names (`exec`, `edit`, `write`, `read`, `apply_patch`, `grep`, `glob`), not Claude Code's capitalized ones |
| Project attribution | Resolved from `DEVIN_PROJECT_DIR`, which Devin sets for every hook process                                                   |
| Context injection   | With `AGENTMEMORY_INJECT_CONTEXT=true`, session start returns recalled context as `hookSpecificOutput.additionalContext`     |

<Note>
  Devin CLI also reads Claude Code's config locations. If you have already run `connect claude-code`, agentmemory appears in `devin mcp list` without any Devin-specific wiring — but the Claude hook manifest's capitalized tool matchers (`Edit|Write|Read`) never match Devin's lowercase tool names, so run `connect devin --with-hooks` for capture that actually fires.
</Note>

## Devin CLI plugin

The bundled plugin registers all 17 skills as `/agentmemory:<skill>` slash commands plus the MCP server:

```bash theme={"dark"}
git clone https://github.com/rohitg00/agentmemory
devin plugins install ./agentmemory/plugin
```

`devin plugins info agentmemory` lists the installed skills. The manifest lives at `plugin/.devin-plugin/plugin.json`.

<Warning>
  Devin plugin hooks cannot fire `SessionStart` or `SessionEnd`, so the plugin alone never registers or closes sessions. Pair it with `connect devin --with-hooks` for full lifecycle capture.
</Warning>

## Devin cloud sessions

Cloud sessions run on Cognition's machines, so `localhost:3111` is unreachable. Host agentmemory first (see [Deployment](/docs/deployment)), then add it as a custom MCP:

1. Settings → Connections → MCP servers → **Add a custom MCP**.
2. Transport **STDIO**, command `npx`, args `-y @agentmemory/mcp@latest`.
3. Environment variables: `AGENTMEMORY_URL` pointing at your deployment, `AGENTMEMORY_SECRET` for the bearer token (store it in Devin Secrets rather than inline).
4. Save, then **Test listing tools** — all 54 tools should appear.

Pin `@latest` in the args: a bare `npx -y @agentmemory/mcp` can serve a stale cached copy that exposes only the 7-tool local fallback set.
