You type a message. The AI responds. Maybe it edits a file, runs a command, fixes a bug.

But what actually happens between your keystroke and that response?

I spent a week poking around Cursor's local files, SQLite databases, and runtime behavior to figure out exactly how the AI agent works under the hood. No documentation, no source code — just...