
How It Works
Cursor provides hooks that fire during agent execution. Our integration captures these events in real-time and sends them to Keywords AI as hierarchical traces. The hook captures thinking blocks, file edits, shell commands, and MCP tool calls as child spans under a root agent span.Prerequisites
- Cursor IDE installed
- Keywords AI API key
- Python 3.8+ with
requestslibrary
Installation
1. Set Environment Variables
Add these to your shell profile (.bashrc, .zshrc, or PowerShell $PROFILE):
2. Download the Hook Script
Download the hook script to your Cursor hooks directory:3. Configure Cursor Hooks
Create~/.cursor/hooks.json with the following configuration: