Using Agent Mode in AI

From the Cursor cheat sheet ยท Agent Mode ยท verified Nov 2026

Using Agent Mode

Let AI complete complex tasks autonomously

bash
# Open Agent
Cmd/Ctrl+I         # Open the Agent panel
Shift+Tab          # Rotate between modes
Cmd/Ctrl+.         # Mode menu

# Modes
Agent              # Builds, refactors, fixes: edits files, runs commands
Ask                # Read-only answers about your code
Plan               # Writes a plan first; click Build to run it
Debug              # Adds logs, asks you to reproduce, then fixes

# What Agent can do
- Search the codebase and the web
- Edit multiple files
- Run terminal commands
- Create checkpoints before significant changes
- Delegate work to subagents

# Undo
Restore Checkpoint # On an earlier message: roll the files back
bash
# Example: Agent building a feature
You: "Add user authentication with JWT"

Agent:
1. Searches for existing auth code
2. Creates the auth middleware
3. Adds login and logout endpoints
4. Updates the user model
5. Runs the tests
# Edits show up in the diff view as it works

# Example: a long-lived objective (still rolling out)
/goal fix all flaky tests and make CI green
๐Ÿ’ก Use Agent for most tasks, Ask to understand code, Plan for multi-file features, Debug for hard bugs
โšก Checkpoints are local and separate from Git; restoring reverts files, not the conversation
๐Ÿ” Edits are applied as Agent works; review them in the diff view and reject what you do not want
๐Ÿ“Œ Each mode has its own context window; start a new chat when you change tasks
agentautonomousai

Continue with Cursor

Save the full cheat sheet or work through every related task.

More AI tasks

Back to the full Cursor cheat sheet