Skip to content

Commit 36e4d4c

Browse files
Merge pull request #6 from scope3data/unified-agents-api
feat: add unified agents API and remove salesAgents
2 parents ecbff19 + 207cbfd commit 36e4d4c

14 files changed

Lines changed: 3645 additions & 555 deletions

File tree

‎.changeset/unified-agents-api.md‎

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
"@scope3/agentic-client": major
3+
---
4+
5+
Add unified agents API and remove salesAgents
6+
7+
BREAKING CHANGE: Removed `salesAgents` resource. Use `agents` resource instead with type filtering.
8+
9+
- Add unified agents resource supporting both SALES and OUTCOME agent types
10+
- Remove deprecated salesAgents resource
11+
- Add JWT authentication support
12+
- Update simple-media-agent to use new agents API
13+
- Update documentation to use 'Agent' instead of 'Sales Agent'
14+
- Add publishConfig for npm publishing
15+
- Update schemas from merged outcomes-agent-registration branch
16+
17+
Migration guide:
18+
- Replace `client.salesAgents.list()` with `client.agents.list({ type: 'SALES' })`
19+
- Replace `client.salesAgents.get()` with `client.agents.get()`
20+
- Replace `client.salesAgents.register()` with `client.agents.register({ type: 'SALES', ... })`

‎README.md‎

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,15 +108,33 @@ await client.mediaBuys.create({
108108
await client.mediaBuys.execute({ mediaBuyId });
109109
```
110110

111-
### Sales Agents
111+
### Agents
112112
```typescript
113-
await client.salesAgents.list();
114-
await client.salesAgents.register({
113+
// List all agents (sales and outcome)
114+
await client.agents.list();
115+
await client.agents.list({ type: 'SALES' });
116+
await client.agents.list({ type: 'OUTCOME' });
117+
118+
// Register a new agent
119+
await client.agents.register({
120+
type: 'SALES',
115121
name: '...',
116122
endpointUrl: '...',
117-
protocol: 'A2A',
123+
protocol: 'MCP',
118124
authenticationType: 'API_KEY',
119125
});
126+
127+
// Get agent details
128+
await client.agents.get({ agentId: '...' });
129+
130+
// Update agent
131+
await client.agents.update({
132+
agentId: '...',
133+
name: 'Updated Name',
134+
});
135+
136+
// Unregister agent
137+
await client.agents.unregister({ agentId: '...' });
120138
```
121139

122140
### Other Resources

‎SIMPLE_MEDIA_AGENT.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ A basic reference implementation of a media agent using MCP (Model Context Proto
66

77
This media agent exposes MCP tools that Scope3 platform calls to manage media buying:
88

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

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

142142
The agent:
143143
1. Receives MCP tool calls from Scope3 platform
144-
2. Fetches products from sales agents via Scope3 API
144+
2. Fetches products from registered agents via Scope3 API
145145
3. Calculates budget allocation with overallocation
146146
4. Creates media buys via Scope3 API
147147
5. Returns results via MCP response

‎TESTING.md‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@
44

55
You need:
66
- Scope3 API key
7-
- Registered sales agents in your Scope3 account
8-
- Products available from those sales agents
7+
- Registered agents in your Scope3 account
8+
- Products available from those agents
99

1010
## Method 1: Direct Testing (Recommended First)
1111

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

@@ -107,7 +107,7 @@ If something fails:
107107

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

113113
## Common Issues

0 commit comments

Comments
 (0)