There are 4 main features of the Cursor IDE: AI code completion, code generation, smart debugging, and code explanations/refactoring (refactoring means to improve existing code). The last 3 features rely on the AI Agent that is within the IDE to help you code. To use this agent, there is a chatbox on the left side of the IDE (can also be accessed through “Cmd/Ctrl + L), that functions similar to ChatGPT, but has 4 different modes:
Agent: the default option that allows the agent to navigate the entire codebase and make changes
Ask: ask the agent information about your codebase, or any other questions you may have regarding potential implementations. Does not modify the codebase
Manual: Manually adds ‘context’ (the files that the agent can view and change) to only include files that you choose
Background: Allows multiple agents to run in the background, letting agents independently code
Other than ask, each of these modes can be used for the code generation, smart debugging, and refactoring features. The ‘Ask’ mode is best used for the code explanations, where there is nothing new in the codebase that needs to be generated. The last feature, AI Code completion can be enabled by opening the command palette with “Cmd/Ctrl + Shift + P”, searching for “enable cursor tab”, and pressing Enter. When you are typing code, Cursor will automatically suggest completions to the line you are writing, based on the rest of the codebase and an AI autocomplete, so that even when you choose to write your own code, the process can be much smoother. (Luciano Sejudo)