# The loop

Every session follows the same loop. The server's prompts (`optimise_pricing_page`, `optimise_signup_flow`, `audit_site_and_plan`) walk an agent through it, and the server instructions repeat it, so most agents follow it without being told.

Before step 1, the agent calls `site_memory` with the URL. It returns earlier audits, changes and outcomes for the site, so the agent continues from previous work instead of repeating it.

| Step | What happens | Tools |
|---|---|---|
| 1. Audit | Capture the live page on desktop and mobile and compare it with the published tactics for its page type. | `audit_page`, `audit_site` |
| 2. Poll | Audits run in the background. The agent waits `poll_after_seconds` between reads until the status is `ready`. | `get_audit` |
| 3. Recommend | Turn the audit into a ranked plan. Each item names a tactic, its evidence grade, the effort and where it goes. | `recommend` |
| 4. Learn | Read the implementation spec and acceptance criteria, and look at real examples from named sites. | `get_tactic`, `get_examples`, `search_tactics` |
| 5. Implement | The agent changes your codebase, matching your design system, and checks each acceptance criterion. | your agent |
| 6. Verify | Once the change is live, re-capture the page, confirm the tactic is present and check for regressions. | `verify_change`, then `get_audit` |
| 7. Report | Tell you what changed, where, why (mechanism and grade), what verification found, and what to do next. | `connect_analytics`, `get_outcomes` |

## What the agent should say, and not say

The report names each tactic's [evidence grade](/docs/evidence-grades). An agent following the server instructions never predicts a numeric result for your site unless the tactic is graded measured, and even then it reports what was measured elsewhere, not a promise.

## Polling and limits

Tools that start work (`audit_page`, `audit_site`, `verify_change`) return an `audit_id` and `poll_after_seconds`. Starting the same audit twice within 24 hours reuses the first result unless the agent passes `force: true`. Page audits count against your plan; reads do not. See [Limits and pricing](/docs/limits).

## Measuring results

`verify_change` proves the change is on the page. Whether it moved a metric needs analytics: `connect_analytics` returns a one-time link for you to connect Google Analytics 4, Search Console or Clarity, and `get_outcomes` reports each metric before and after. Measured outcomes from connected sites are what lift a tactic to the measured grade.
