Skip to main content
An Apostra-connected coding agent can review active Buyer campaigns using the campaign records in Apostra and live delivery from each campaign’s connected provider. The review is read-only: it explains what changed and what a person should consider doing, but it does not change budgets, pause media, or launch anything. This is an interactive reporting workflow, not an export. It does not require a Meta file, a second reporting store, or a provider-specific integration in the coding agent.

Ask for the review

After installing the Apostra developer package, ask Codex, Claude Code, or another connected MCP host:

Complete authorization when asked

There are two separate connections. The coding-agent host first authorizes you to Apostra. Apostra then checks whether the requested reporting provider is connected to your Buyer Account. If either connection is missing, the agent pauses and gives you a secure browser handoff. For a missing Meta connection in a command-line host, Apostra returns a one-time authorization URL. Open it, complete Meta’s authorization flow, and tell the agent when you are done. A host that supports Apostra’s Sellers app can open the same connection flow inside the conversation. Do not paste an Apostra token, Meta password, API key, or provider token into the prompt. The agent should verify the connection after the browser flow and should not claim that delivery is readable until a live campaign request succeeds. Account selection or advertiser mapping may require another explicit human choice before the review can continue. Seeing Meta in the account’s available destinations does not by itself prove that Meta is connected. The agent checks the exact seller connection, credential, selected provider account, and advertiser mapping. If the credential is already active, it does not ask you to authorize it again. Enhanced Reporting is not required for this live campaign read. Name the advertiser when your account contains more than one portfolio. Add your numeric performance target, minimum evidence requirement, and maximum allowed budget movement when you want financial recommendations. For example:
Without those operating limits, the agent can still report relative movement and recommend watching or investigating an item. It should not invent a target or an exact budget change.

What the agent reads

The agent verifies the active Buyer Account and resolves the provider-backed campaign roster before requesting delivery. If the Meta connection is ready but its campaign roster has not been subscribed into Apostra, the agent asks before changing that subscription. Otherwise it calls get_delivery with report: "live_campaign_delivery" twice for each exact campaign: once for the current seven-day window and once for the previous seven-day window. The review itself remains read-only. The earlier authorization handoff is a separate setup step: a provider connection is established only after you approve it in the browser. Each campaign read preserves the provider’s validated delivery response. The agent passes the campaign ID and date range only. Live campaign delivery does not accept metric selection, grouping dimensions, other filters, or pagination, and it does not read Apostra’s reporting store. The separate campaign_delivery report keeps its stored rows, totals, and pagination contract. Provider responses can contain unavailable metrics, mixed currencies, or warnings. The review keeps those conditions visible. A live provider response does not claim that the data is final for a reporting pipeline. No delivery totals is not the same as zero performance. When a provider returns no totals for the requested window, the review marks impressions, spend, clicks, conversions, and derived rates as unavailable.

How comparisons are calculated

The agent compares the additive totals for each requested period, including impressions, clicks, spend, conversions, and conversion value. It then calculates CTR, CPC, CPA, and ROAS from those totals. It does not average rate values from package or placement rows. Pacing requires the current budget, flight, pacing method, and lifetime spend. The agent compares spend with a linear elapsed-flight expectation only when the campaign explicitly uses even pacing and has bounded flight dates. For another pacing plan, it reports budget utilisation without inventing a linear target. Monetary comparisons stay within one currency. An exact reallocation also requires comparable periods, enough observed volume, the current budget, and the limit supplied by the person running the review.

What the result contains

The result names the account, advertiser, extraction time, and exact current and comparison periods. Each item receives one proposed action: keep, watch, investigate, increase, reduce, or pause. The action includes the current and prior evidence, its uncertainty, and the next human step. Data-quality limitations appear alongside the recommendations. A missing conversion metric, partial result, or currency mismatch makes the recommendation weaker; it never becomes evidence that performance was zero.

Run it routinely

Run the prompt on demand, or use the coding-agent host’s scheduler when it supports recurring work. The host owns when the prompt runs. Apostra remains the source of campaign state and the access layer for live delivery; the connected provider remains the authority for the delivery response. Each run should read current state again rather than relying on the previous conversation. Scheduling a review does not authorize campaign changes. If a person asks to apply one of its recommendations, the agent must re-read the exact campaign or media buy and follow the current campaign-management confirmation flow. For the underlying reporting contract, see Build a reporting pipeline and Query campaign delivery.