Set up your agent
Sign up for Scope3 and get an API key. Our MCP server is at https://api.agentic.scope3.com/mcp and uses the HTTP Streaming transport mechanism. For authentication, addx-scope3-api-key: {scope3_api_key}
.
Sample agent
If you don’t have an agent, download this Python script: 🐍 langchain-claude-agent.py This example shows how to:- Connect to the Scope3 MCP API using langchain-mcp-adapters
- Create a react agent with Claude as the reasoning engine
- Build an interactive chat interface for campaign management
.env
, and run the agent!
If you use Claude Code or another coding agent, check out the quickstart for agents!
Steps your agent needs to do to set up a campaign
- Create a brand agent, which holds the goals and key objects for an advertiser
- Add creatives directly or connect a creative agent
- Use a prompt to set up a campaign
- Explore the tactics the campaign is using
- Monitor performance
Create Brand Agent
Your brand agent acts as an advertiser account that owns all campaigns and assets. Brand agents have three identifiers that you can use to reference them across all of our APIs, which saves a lookup roundtrip or the need to cache our ID somewhere:- Internal Scope3 ID
- Your ID, which we call this the external ID. For instance, if your naming scheme is ‘scope3-nike-us-aug2025-lightup-2823’, you could pass that into any tool and we will map it to this agent.
- A nickname. For instance if you give the agent the nickname “Nike EMEA”, you could ask “what are all the campaigns live for the Nike EMEA agent” and send “Nike EMEA” into any of our MCP tools
create_brand_agent
with body:
create_brand_agent
response
Add Creatives
Creatives can be added after the campaign is set up, but let’s do it now. Let’s assume we’re running a third-party tag for the purposes of this demo, but the platform also supports native, hosted, and custom formats too. Again, the platform supports external IDs and nicknames if helpful. User: OK, here are my ad tags for this campaign: Creative 1<html>...</html>
Creative 2
<html>...</html>
Agent:
Call tool create_creatives
with body:
create_creatives
response
Sales Agents (Automatic Access)
Your campaigns automatically have access to advertising inventory through Scope3’s sales agent relationships. No setup required! Optional: Register Your Own Sales Agent Account If you have a direct relationship with a sales agent, you can register your account to:- Pay them directly (Scope3 charges less for direct connections)
- Use your negotiated terms and rates
- Note that you will get invoiced separately by Scope3 for these campaigns, whereas for Scope3 accounts these fees are factored into media cost
sales_agents_register
with body:
sales_agents_register
response
When you register your own sales agent account, you handle payments directly with that sales agent. Your account will override Scope3’s default relationship with that sales agent.
Set up the campaign
The “magic” of using an agentic API is that we don’t need to try to map all of the complex targeting fields across platforms because AI is very good at figuring out, for instance, that “US” and “USA” are the same thing - we don’t need a complex protocol spec for handling ISO country codes. We also don’t need to try to take a well-thought-out brief and map it to an audience or contextual taxonomy. Instead, we can send our brief to signals agents - which could include an internal agent that knows about our customer data - and let the agent recommend the best audiences for this brief. We could also manage this selection process with our own algorithm, or feed in sales data to score outcomes that would inform the Scope3 algorithm. There is a lot more to say about how campaigns work in the agentic context, but we’ll save that for later. For now, let’s write a simple brief and let the Scope3 engine recommend the best tactics for our brief. (to do - let’s add scoring and optimization to this example) User: Nike is looking for high school and college volleyball players for their new line of “Super Spike” shoes - the first indoor spikes. They think the target audience skews female, but recognize that volleyball parents are often called in to make these complex shoe purchases. They want to launch in the US in Q4 with a total budget of $250,000 running on premium display inventory. We will run creative 1 and creative 2 on this campaign. Agent: Call toolcreate_campaign
with data:
create_creatives
response
Explore tactics
Tactics are a combination of inventory and signals that are executed in an actual media buy with a publisher. To execute a campaign, we need to:- Find inventory that could be a fit for our campaign
- Find signals that could be a fit for our campaign
- Build a candidate list of tactics that combine inventory and signals
- Calculate how many tactics we can explore given our budget and measurement sensitivity
- Select the initial set of tactics to try
- Select a price point and daily budget for each tactic
- Allocate more budget to the tactics that are working
- Adjust price for tactics
- Send the Nike brief and our creative formats to each publisher using the AdCP
get_products
tool and get back a list of media products (which could include publisher data or optimization) - Send the Nike brief to any connected signals agents to see if any audience data might help find volleyball players or families
- (to do - scoring details)
- Select the initial tactics and prices based on heuristic and historical data
get_campaign_tactics
with data:
get_campaign_tactics
response:
Monitor Performance
Once the campaign launches, we can monitor performance in a few ways, from getting log-level data pushed to a cloud bucket, using the APIs to dump aggregated data into an analytics system, or simply asking how the campaign is doing. If we don’t specify a date range, the system will assume “lifetime to date”. User: How is Super Spike Q4 doing? Agent: Call toolget_campaign_summary
:
get_campaign_summary
response:
🎉 Congratulations!
You’ve successfully:- ✅ Created your first brand agent
- ✅ Added creatives
- ✅ Launched a campaign
- ✅ Explored optimization tactics
- ✅ Monitored performance
Next steps
Some ideas for where to go from here:- Try our working example: Download our complete LangChain agent to see how to build interactive campaign management tools
- Explore creative formats and creative agents
- Learn about scoring outcomes to enable automatic optimization
- Set up brand standards to ensure your campaigns only run where you want them to
Common Questions (to do)
How long until I see campaign delivery?
How long until I see campaign delivery?
Campaigns typically start delivering within 2-4 hours of launch. Initial optimization begins immediately, with meaningful performance data available within 24-48 hours.
What's the minimum viable budget?
What's the minimum viable budget?
While campaigns can start at 10,000+ for campaigns where performance optimization is important. Higher budgets enable more effective machine learning.
Can I use this with ChatGPT or Claude?
Can I use this with ChatGPT or Claude?
Yes! All tools work conversationally with AI assistants. The natural language interface makes campaign management accessible to non-technical users.
How do I integrate with my existing analytics?
How do I integrate with my existing analytics?
Use the data export tools to push campaign data to your BI systems, or set up webhooks for real-time integration. We support all major analytics platforms.