Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .changeset/unified-agents-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
"@scope3/agentic-client": major
---

Add unified agents API and remove salesAgents

BREAKING CHANGE: Removed `salesAgents` resource. Use `agents` resource instead with type filtering.

- Add unified agents resource supporting both SALES and OUTCOME agent types
- Remove deprecated salesAgents resource
- Add JWT authentication support
- Update simple-media-agent to use new agents API
- Update documentation to use 'Agent' instead of 'Sales Agent'
- Add publishConfig for npm publishing
- Update schemas from merged outcomes-agent-registration branch

Migration guide:
- Replace `client.salesAgents.list()` with `client.agents.list({ type: 'SALES' })`
- Replace `client.salesAgents.get()` with `client.agents.get()`
- Replace `client.salesAgents.register()` with `client.agents.register({ type: 'SALES', ... })`
26 changes: 22 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,33 @@ await client.mediaBuys.create({
await client.mediaBuys.execute({ mediaBuyId });
```

### Sales Agents
### Agents
```typescript
await client.salesAgents.list();
await client.salesAgents.register({
// List all agents (sales and outcome)
await client.agents.list();
await client.agents.list({ type: 'SALES' });
await client.agents.list({ type: 'OUTCOME' });

// Register a new agent
await client.agents.register({
type: 'SALES',
name: '...',
endpointUrl: '...',
protocol: 'A2A',
protocol: 'MCP',
authenticationType: 'API_KEY',
});

// Get agent details
await client.agents.get({ agentId: '...' });

// Update agent
await client.agents.update({
agentId: '...',
name: 'Updated Name',
});

// Unregister agent
await client.agents.unregister({ agentId: '...' });
```

### Other Resources
Expand Down
4 changes: 2 additions & 2 deletions SIMPLE_MEDIA_AGENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ A basic reference implementation of a media agent using MCP (Model Context Proto

This media agent exposes MCP tools that Scope3 platform calls to manage media buying:
Comment thread
EmmaLouise2018 marked this conversation as resolved.
Comment thread
nastassiafulconis marked this conversation as resolved.

- **get_proposed_tactics**: Fetches products from sales agents and proposes budget allocation based on floor prices
- **get_proposed_tactics**: Fetches products from registered agents and proposes budget allocation based on floor prices
- **manage_tactic**: When assigned, creates media buys by allocating budget to the N cheapest products with overallocation

**Protocol**: MCP (stdio) - All communication via MCP, no HTTP server needed!
Expand Down Expand Up @@ -141,7 +141,7 @@ Scope3 Platform → MCP (stdio) → Simple Media Agent → Scope3 API

The agent:
1. Receives MCP tool calls from Scope3 platform
2. Fetches products from sales agents via Scope3 API
2. Fetches products from registered agents via Scope3 API
3. Calculates budget allocation with overallocation
4. Creates media buys via Scope3 API
5. Returns results via MCP response
Expand Down
8 changes: 4 additions & 4 deletions TESTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@

You need:
- Scope3 API key
- Registered sales agents in your Scope3 account
- Products available from those sales agents
- Registered agents in your Scope3 account
- Products available from those agents

## Method 1: Direct Testing (Recommended First)

Expand Down Expand Up @@ -77,7 +77,7 @@ This opens a web UI where you can:
### manage_tactic
✅ Creates media buys with:
- Sum of all budgets = original budget * 1.4 (40% overallocation)
- Each media buy has correct product ID, sales agent ID, CPM
- Each media buy has correct product ID, agent ID, CPM
- Uses MediaBuyProduct structure from ADCP client
- N products where daily budget >= $100

Expand Down Expand Up @@ -107,7 +107,7 @@ If something fails:

1. **Check logs**: The server outputs to stderr
2. **Verify API key**: Make sure it's valid and has proper permissions
3. **Check sales agents**: Run `scope3.salesAgents.list()` to verify you have agents registered
3. **Check agents**: Run `scope3.agents.list({ type: 'SALES' })` to verify you have agents registered
4. **Check products**: Run `scope3.products.discover()` to verify products are available

## Common Issues
Expand Down
Loading