PruuvDocs

AI Agent

The Pruuv AI agent is an autonomous optimisation agent that analyses your clients' campaign performance, compares it against their targets, and surfaces actionable recommendations. With the right approval settings, it can also execute approved changes directly — adjusting bids, budgets, and status — without manual intervention.

What the agent does

On each scheduled run, the agent:

  1. Fetches the latest ad performance data for the client's connected accounts
  2. Loads the client's active targets (CPA, ROAS, CPL, budget, and custom KPIs)
  3. Analyses trends, anomalies, and performance gaps using a multi-step reasoning process
  4. Generates structured recommendations — each with a category, action, confidence score, and rationale
  5. Queues recommendations for human review or auto-executes them based on the client's approval settings

Schedules

Each client can have one or more agent schedules configured. A schedule defines how often the agent runs for that client and what it is authorised to do.

Schedule typeCadenceTypical use
HourlyEvery hourHigh-spend accounts requiring rapid response to anomalies
DailyOnce per dayStandard campaign monitoring — most common
WeeklyOnce per weekLow-activity accounts or strategic review cadence
CustomCron expressionAgency-defined timing for specific client workflows

Recommendations

Recommendation categories

CategoryDescription
bid_adjustmentIncrease or decrease bid for a specific ad set or campaign
budget_reallocationMove budget from underperforming to overperforming campaigns
pausePause a campaign, ad set, or ad based on performance data
resumeResume a previously paused item that shows recovery signals
creative_flagFlag a creative for human review based on performance data
target_reviewAlert that a target may be unrealistic given current market data
anomalyHighlight an unusual data point that warrants investigation

Confidence scores

Each recommendation includes a confidence_score between 0 and 1 reflecting how strongly the evidence supports the recommendation. Scores above 0.8 indicate high confidence based on consistent multi-period data. Scores below 0.5 indicate the agent detected a signal but lacks sufficient data to be certain.

Confidence scores are advisory signals, not guarantees. Always review the rationale provided alongside the score before approving a high-impact action.

Approval workflow

Each client has an approval configuration that controls how recommendations are handled:

Approval modeBehaviour
Require approval (default)All recommendations are queued for human review. No changes are made until an agency user approves.
Auto-approve below thresholdRecommendations with confidence above a set threshold and value below a spend limit are auto-executed.
Full autoAll recommendations are executed immediately. Suitable for trusted accounts with well-validated targets.

Approved recommendations are executed via the platform APIs (Meta, Google, TikTok) using the connected OAuth tokens. The execution status and any platform error response are recorded against the recommendation record.

Post-execution checks

After a recommendation is executed, Pruuv automatically schedules a follow-up agent run 4–8 hours later to assess whether the change had the intended effect. The results are stored as outcome measurements and used to improve future recommendation confidence calibration.

Outcome assessment

For recommendations that are at least 7 days old, Pruuv runs a daily outcome assessment that compares the KPIs from before and after the change. Outcome data is visible in the recommendation history and contributes to the agent's self-calibration over time.

Background jobs

The agent runs as a set of Inngest durable functions. You can monitor job status and recent runs from Settings > Background Jobs in the Pruuv dashboard.

FunctionTriggerPurpose
agent-run-schedulerEvery 1 min (cron)Finds due client schedules and fans out one agent run event per client
agent-run-workerEvent-drivenAssembles context, runs the AI, saves recommendations. Retries: 2
assess-outcomesDaily 06:00 UTCRecords post-execution KPI measurements for recommendations ≥7 days old
post-execution-checksEvery 1 hourTriggers re-analysis for clients with actions executed 4–8 hours ago
post-execution-check-workerEvent-drivenRe-runs agent for a single client to assess whether an action improved metrics