cookbook README

The project's README from github.com/cursor/cookbook. As one markdown file: README.md.

Cursor Cookbook

This repo contains small examples for building with Cursor.

Cursor Hooks

Cursor Hooks let you run custom checks and workflows around agent events such as prompt submission, shell commands, file edits, and agent completion.

Hooks examples

A guided project hook setup for audit logging, sensitive prompt guards, and follow-up checks that keep Cursor skills aligned with code changes.

Cloud Agents

Self-hosted Cloud Agents lab

Run Cursor Cloud Agent workers on customer-managed AWS infrastructure with examples for EC2 + Docker and ECS/Fargate.

Cursor SDK

The Cursor SDK is the TypeScript API for running Cursor's coding agent from your own apps, scripts, and workflows. It supports the same agent across local workspaces and cloud runtimes, streams agent events as runs progress, and lets you manage prompts, models, cancellation, artifacts, and conversation state from code.

To run the SDK examples, create a Cursor API key from the Cursor integrations dashboard, then set it as CURSOR_API_KEY.

Quickstart

A minimal Node.js example that creates a local agent, sends one prompt, and streams the response.

Prototyping tool

A web app for spinning up agents to scaffold new projects and iterate on ideas in a sandboxed cloud environment.

Kanban board

A kanban board for viewing Cursor Cloud Agents, grouping them by status or repository, previewing artifacts, and creating new cloud agents from a repository and prompt.

Coding agent CLI

A minimal command-line interface that lets you spawn Cursor agents from your terminal.

DAG task runner

Decompose a task into a JSON DAG, fan it out across local subagents, and stream live status into a Cursor Canvas that hot-reloads on every state change. Ships as both a runnable example and a copyable Cursor skill at .cursor/skills/dag-task-runner.

Perl bridge adapter

A miniature Cursor SDK in Perl on the open sdk.v1 bridge. Shows how to spawn cursor-sdk-bridge, speak Connect JSON, and run one local agent turn without a first-party SDK.

Learn more in the Cursor SDK TypeScript docs and the SDK Bridge docs.

xAI API

Grok Coding Agent CLI

An educational Python coding-agent loop that uses an xAI Console API key, defaults to grok-4.6, and provides workspace-scoped file and shell tools.

Grok Voice Patient Intake

A LiveKit voice agent that uses xAI's native realtime speech-to-speech model for a fictional family-medicine intake and appointment workflow.

cookbook (cursor/cookbook)

Searching Database…

What is this?A collection of small, standalone examples for building on top of Cursor's agent platform, covering Cursor Hooks, self-hosted Cloud Agents, the Cursor SDK, a coding-agent CLI, and even third-party integrations with xAI's Grok.
Is this one app or a bunch of separate examples?It is a cookbook: each folder is an independent, self-contained example (a CLI, a web app, an SDK script, or a hook config) rather than one unified application.
How do I run the Cursor SDK examples?Create a Cursor API key from the Cursor integrations dashboard, set it as CURSORAPIKEY, then run an example such as the Node.js quickstart that creates a local agent, sends a prompt, and streams the response.
Do I need an xAI API key for the Grok examples?Yes, the Grok Coding Agent CLI uses an xAI Console API key and defaults to the grok-4.6 model; the voice intake example also relies on xAI's realtime speech model plus LiveKit.
Is there one setup that covers the whole repo?No, there is no single install step: each example (hooks, SDK, CLI, Perl bridge, cloud agents) has its own runtime and credentials, so you set up only the piece you want to try.
Who is this cookbook for?Developers who want to extend or embed Cursor's coding agent into their own apps, CLIs, cloud infrastructure, or non-TypeScript stacks.
What do the Cursor Hooks examples show?They demonstrate audit logging, sensitive-prompt guards, and follow-up checks that run around agent events like prompt submission and file edits, keeping Cursor skills in sync with code changes.
What does the DAG task runner example do?It decomposes a task into a JSON DAG, fans it out across local subagents, and streams live status into a Cursor Canvas that hot-reloads on every state change; it also ships as a copyable Cursor skill.
What is the Perl bridge adapter for?It shows how to drive one local Cursor agent turn from Perl by speaking the open sdk.v1 Connect JSON protocol over the cursor-sdk-bridge, with no first-party Perl SDK required.
Why is there an xAI Grok example in a Cursor cookbook?It pairs a minimal grok-4.6 coding-agent CLI with a LiveKit voice agent using xAI's realtime speech-to-speech model for a fictional patient-intake workflow, showing how the same agent patterns extend to other model providers.
Creator
cursor
Size
3.3 MB
Stars
4.1K
Updated
CommitSep 02
Age
5mo
Commits · 90 Days