> ## Documentation Index
> Fetch the complete documentation index at: https://leverhq.app/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Safety Model

> How Lever protects your ad spend with draft-preview-confirm

# How Lever protects your ad spend

Lever is designed so that AI agents can manage real ad spend without risk. Every write operation goes through a safety flow that requires explicit confirmation before any change takes effect.

## Draft-Preview-Confirm

When your agent makes a change — pausing a campaign, adjusting a budget, updating a status — the operation is never executed immediately. Instead, it follows a three-step flow:

<Steps>
  <Step title="Agent calls a write tool">
    For example, your agent calls `google_ads_update_campaign` to pause a campaign. Lever fetches the campaign's current state and creates a human-readable preview of the proposed changes.
  </Step>

  <Step title="Draft is created">
    The operation is stored as a pending draft with a **5-minute TTL**. Lever returns the preview and a `draftId` to the agent. No changes have been made to your ad account.
  </Step>

  <Step title="Agent confirms the draft">
    The agent shows you the preview and calls `confirm_draft` with the `draftId`. Lever atomically claims the draft and executes the change via the platform API. If execution succeeds, the result is returned. If execution fails, the draft is consumed — the agent must call the write tool again to create a new draft. If the draft isn't confirmed within 5 minutes, it expires automatically.
  </Step>
</Steps>

Here's what the flow looks like in practice:

```
Agent: "I'd like to pause campaign 'Summer Sale' — here's the preview:"

  Campaign "Summer Sale" (12345):
  Status: ENABLED → PAUSED

  Draft ID: abc-123
  Expires: 5 minutes

Agent: "Should I confirm this change?"
You: "Yes, go ahead."
Agent: [calls confirm_draft] → "Done. Campaign 'Summer Sale' is now paused."
```

<Warning>
  There is no `cancel_draft` tool. If you decide not to proceed with a change, simply don't confirm it — the draft will expire automatically after 5 minutes.
</Warning>

## Budget Caps

<Info>
  **Coming soon.** Budget caps will enforce hard spending limits that your agent cannot exceed, checked before every write operation.
</Info>

## Audit Logging

Every action your agent takes through Lever is recorded in an audit log. Each entry includes:

* **Who** — your user ID
* **What** — the action taken (e.g., `list_campaigns`, `update_campaign_draft`, `confirmed_update_campaign`)
* **Where** — the platform (Google Ads or Meta Ads) and resource affected
* **When** — timestamp of the action
* **Status** — `success`, `error`, `draft`, `executed`, or `failed`

You can view your audit log in the [Lever dashboard](https://leverhq.app).

## Quota Usage

<Note>
  Each tool call = one credit toward your monthly quota. Draft creation and confirmation are separate tool calls, each counting as 1 credit — so a full draft-preview-confirm cycle uses 2 credits total. See [Pricing](/pricing) for tier limits.
</Note>
