Skip to Content
Docs are being rebuilt — start at Introduction → How it works.

Campaign analyzer

You’ll build an agent that takes an exported campaign report, computes the key metrics in code, and returns a summary with visuals.

The plan

  1. Create the analyzer agent
  2. Accept the campaign export
  3. Enable code execution for the math and charts
  4. Return a summary with visuals

Step 1 — Create the agent

Create an agent in Agents. In System instructions, define the metrics that matter (CTR, CPA, ROAS, conversion) and the takeaways you want highlighted.

Step 2 — Accept the export

Turn on Accept files in the Capabilities tab so a marketer can attach the CSV or spreadsheet export.

Step 3 — Enable code execution

Turn on workspace execution and code execution so the agent computes metrics exactly and can generate charts as images rather than estimating.

Step 4 — Return a visual summary

Enable Artifacts in the Capabilities tab so the agent delivers a readable report with the generated charts the team can download. Test from the builder preview.

Where to go next