Skip to lesson
Exit
AI editor systems and design1 / 3

1 min lesson

Run an agent loop from evidence

Trace one turn through planning, action, observation, verification and review.

Step 1 of 3

Cursor's current product-engineering role lists interfaces for reviewing pull requests with AI-generated code as a sample project. Agent design therefore includes both the execution loop and the review experience around its changes.

Cursor's Agent can read files, call tools and edit code. Current documentation says those edits appear as the agent works, can be reviewed in a diff and can be rolled back to an Agent checkpoint. A system design should explain how each action is chosen, observed and verified.

Learn more

Full explanation

Trace one agent turn

One pass through an agent loop

Interactive diagram. Step through it with the Next and Previous controls below, or Tab to a region to read its detail.

diagram: flow

Each pass produces evidence for the next decision and ends with a check against the request.

Use tool results as evidence

After an edit, read the changed file and run the relevant check. If the check fails, use its output to decide what to inspect or change next. A tool call without its result cannot support the next decision.