Beta

Start here

Connect Cursor

Add the Agentower hook to Cursor's agent. Cursor agents show their status only.

#1. Save the address and key, and install the hook

Do steps 1 and 2 of Connect Claude Code — save ~/.agentower/claude-code.env and put agentower-hook.sh in ~/.agentower/. You don't need the Claude Code settings.json part.

#2. Add the hook to Cursor

Add these entries to ~/.cursor/hooks.json (merge them with any hooks you already have). AGENTOWER_TOOL=cursor tells the script it's reporting for Cursor.

~/.cursor/hooks.json
{
  "version": 1,
  "hooks": {
    "sessionStart": [{ "command": "AGENTOWER_TOOL=cursor sh \"$HOME/.agentower/agentower-hook.sh\"", "timeout": 5 }],
    "sessionEnd": [{ "command": "AGENTOWER_TOOL=cursor sh \"$HOME/.agentower/agentower-hook.sh\"", "timeout": 5 }],
    "beforeSubmitPrompt": [{ "command": "AGENTOWER_TOOL=cursor sh \"$HOME/.agentower/agentower-hook.sh\"", "timeout": 5 }],
    "preToolUse": [{ "command": "AGENTOWER_TOOL=cursor sh \"$HOME/.agentower/agentower-hook.sh\"", "timeout": 5 },{ "command": "AGENTOWER_TOOL=cursor sh \"$HOME/.agentower/agentower-hook.sh\" guard", "timeout": 5 }],
    "postToolUse": [{ "command": "AGENTOWER_TOOL=cursor sh \"$HOME/.agentower/agentower-hook.sh\"", "timeout": 5 }],
    "postToolUseFailure": [{ "command": "AGENTOWER_TOOL=cursor sh \"$HOME/.agentower/agentower-hook.sh\"", "timeout": 5 }],
    "beforeShellExecution": [{ "command": "AGENTOWER_TOOL=cursor sh \"$HOME/.agentower/agentower-hook.sh\"", "timeout": 5 }],
    "afterShellExecution": [{ "command": "AGENTOWER_TOOL=cursor sh \"$HOME/.agentower/agentower-hook.sh\"", "timeout": 5 }],
    "beforeMCPExecution": [{ "command": "AGENTOWER_TOOL=cursor sh \"$HOME/.agentower/agentower-hook.sh\"", "timeout": 5 }],
    "afterMCPExecution": [{ "command": "AGENTOWER_TOOL=cursor sh \"$HOME/.agentower/agentower-hook.sh\"", "timeout": 5 }],
    "afterFileEdit": [{ "command": "AGENTOWER_TOOL=cursor sh \"$HOME/.agentower/agentower-hook.sh\"", "timeout": 5 }],
    "stop": [{ "command": "AGENTOWER_TOOL=cursor sh \"$HOME/.agentower/agentower-hook.sh\"", "timeout": 5 }]
  }
}

Restart Cursor so it loads the hooks, then start an agent: it appears on the Agents board within a few seconds.

The hook takes the project name from the first folder open in Cursor's workspace. It never sends Cursor's account email or file contents, and sends your prompt only as below.

#The work record

For Cursor, the hook reads only the start of each turn for the work record, so a Cursor agent's work record holds only its work stream (from the branch, the worktree folder or AGENTOWER_LABEL) and — for projects with Work details on, hook version 6 — the first 600 characters of each instruction, secrets masked. No files, tests, commits or summary: the Work tab says "Files, tests and commits: not reported by Cursor" and "Summary: not reported by Cursor".

#Disconnect

Remove the entries that mention agentower-hook.sh from ~/.cursor/hooks.json and restart Cursor.