The man behind Cursor's "memory" feature

· Source: Greg Kamradt · Field: Technology & Digital — Artificial Intelligence & Machine Learning, Software Development & Engineering · Depth: Advanced, long

Summary

Yash from Cursor's engineering team detailed the development of the IDE's "Memory" feature, a load-bearing process for the $9 billion IDE. This feature aims to augment three types of agent context: directional (narrowing search), operational (runbook conventions), and behavioral (user preferences). The team prototyped two main approaches: a "sidecar" model that independently processes conversations to decide what to save or update, and a "tool call" approach where the main model uses an "update memory" tool. While Sonnet 4 and Opus 4 models showed improved instruction following for tool calls, they tended to generate task-specific memories, which are less desirable for a coding agent. The sidecar approach, despite initial challenges with filtering task-specific information, proved effective with newer reasoning models, requiring less aggressive prompting. Evaluation focused on memory quality, particularly filtering out task-specific data, rather than retrieval speed. Cursor currently keeps memory generation somewhat hidden from users to manage expectations about memory perfection.

Key takeaway

For AI Engineers developing coding assistants, understanding the distinction between task-specific and generalizable memories is crucial. You should prioritize filtering out transient conversational data to prevent the model from "doubling down" on incorrect or irrelevant information, which can significantly degrade user experience. Consider a hidden memory generation process to manage user expectations, as models can effectively filter noise from imperfect memory banks.

Key insights

Cursor's Memory feature enhances agent context by distinguishing between task-specific and generalizable information for improved coding assistance.

Principles

Method

Cursor prototyped "sidecar" (background model decision) and "tool call" (main model with update tool) approaches for memory generation, prioritizing filtering task-specific data and leveraging advanced reasoning models.

In practice

Topics

Best for: Machine Learning Engineer, AI Engineer, Software Engineer

Related on AIssential

Open in AIssential →

Editorial summary, takeaway, and curation by AIssential. Original article published by Greg Kamradt.