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
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ LOG_LEVEL=info
# Sales Agents Configuration (JSON string)
# Replace with your actual agent endpoints and authentication tokens
# For local testing, you can use the test MCP server:
SALES_AGENTS_CONFIG='{"agents": [{"id": "test_mcp_local", "name": "Local Test MCP Server", "agent_uri": "http://127.0.0.1:3001/mcp", "protocol": "mcp", "requiresAuth": false}, {"id": "demo_agent_a2a", "name": "Demo A2A Agent", "agent_uri": "https://your-agent-endpoint.com", "protocol": "a2a", "auth_token_env": "your-actual-auth-token-here", "requiresAuth": true}, {"id": "demo_agent_mcp", "name": "Demo MCP Agent", "agent_uri": "https://your-agent-endpoint.com/mcp", "protocol": "mcp", "auth_token_env": "your-actual-auth-token-here", "requiresAuth": true}]}'
SALES_AGENTS_CONFIG='{"agents": [{"id": "test_mcp_local", "name": "Local Test MCP Server", "agent_uri": "http://127.0.0.1:3001/mcp", "protocol": "mcp", "requiresAuth": false}, {"id": "demo_agent_a2a", "name": "Demo A2A Agent", "agent_uri": "https://test-agent.adcontextprotocol.org", "protocol": "a2a", "auth_token_env": "your-actual-auth-token-here", "requiresAuth": true}, {"id": "demo_agent_mcp", "name": "Demo MCP Agent", "agent_uri": "https://test-agent.adcontextprotocol.org/mcp", "protocol": "mcp", "auth_token_env": "your-actual-auth-token-here", "requiresAuth": true}]}'

# Test MCP Server Configuration
MCP_SERVER_PORT=3001
Expand Down
14 changes: 7 additions & 7 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -241,15 +241,15 @@ The production `SALES_AGENTS_CONFIG` should contain:
{
"id": "principal_3bd0d4a8_a2a",
"name": "AdCP Test Agent",
"agent_uri": "https://adcp-sales-agent.fly.dev",
"agent_uri": "https://test-agent.adcontextprotocol.org",
"protocol": "a2a",
"auth_token_env": "<AUTH_TOKEN>",
"requiresAuth": true
},
{
"id": "principal_3bd0d4a8_mcp",
"name": "AdCP Test Agent",
"agent_uri": "https://adcp-sales-agent.fly.dev/mcp/",
"agent_uri": "https://test-agent.adcontextprotocol.org/mcp/",
"protocol": "mcp",
"auth_token_env": "<AUTH_TOKEN>",
"requiresAuth": true
Expand All @@ -265,7 +265,7 @@ When you need to change agents, auth tokens, or URIs:

```bash
# Single line format for terminal (replace <AUTH_TOKEN> with actual token)
fly secrets set SALES_AGENTS_CONFIG='{"agents":[{"id":"principal_3bd0d4a8_a2a","name":"AdCP Test Agent","agent_uri":"https://adcp-sales-agent.fly.dev","protocol":"a2a","auth_token_env":"<AUTH_TOKEN>","requiresAuth":true},{"id":"principal_3bd0d4a8_mcp","name":"AdCP Test Agent","agent_uri":"https://adcp-sales-agent.fly.dev/mcp/","protocol":"mcp","auth_token_env":"<AUTH_TOKEN>","requiresAuth":true}]}'
fly secrets set SALES_AGENTS_CONFIG='{"agents":[{"id":"principal_3bd0d4a8_a2a","name":"AdCP Test Agent","agent_uri":"https://test-agent.adcontextprotocol.org","protocol":"a2a","auth_token_env":"<AUTH_TOKEN>","requiresAuth":true},{"id":"principal_3bd0d4a8_mcp","name":"AdCP Test Agent","agent_uri":"https://test-agent.adcontextprotocol.org/mcp/","protocol":"mcp","auth_token_env":"<AUTH_TOKEN>","requiresAuth":true}]}'
```

#### Toggle Real vs Demo Agents
Expand Down Expand Up @@ -299,8 +299,8 @@ fly logs -n | grep "Configured agents"
Should show:
```
📡 Configured agents: 2
- AdCP Test Agent (A2A) at https://adcp-sales-agent.fly.dev
- AdCP Test Agent (MCP) at https://adcp-sales-agent.fly.dev/mcp/
- AdCP Test Agent (A2A) at https://test-agent.adcontextprotocol.org
- AdCP Test Agent (MCP) at https://test-agent.adcontextprotocol.org/mcp/
🔧 Real agents mode: ENABLED
```

Expand All @@ -322,8 +322,8 @@ Should show:

3. **Agent not responding**: Check agent health:
```bash
curl -I https://adcp-sales-agent.fly.dev
curl -I https://adcp-sales-agent.fly.dev/mcp/
curl -I https://test-agent.adcontextprotocol.org
curl -I https://test-agent.adcontextprotocol.org/mcp/
```

4. **Authentication issues**: Verify auth token in agent config and ensure `requiresAuth: true`
Expand Down
14 changes: 7 additions & 7 deletions PRODUCTION-READY.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
## ✅ What's Configured for Production

### **Real Agent Integration**
- **Test A2A Agent**: `https://adcp-sales-agent.fly.dev`
- **Test MCP Agent**: `https://adcp-sales-agent.fly.dev/mcp`
- **Test A2A Agent**: `https://test-agent.adcontextprotocol.org`
- **Test MCP Agent**: `https://test-agent.adcontextprotocol.org/mcp`
- **Protocol Support**: Both A2A and MCP protocols with real HTTP requests

### **Deployment Configuration**
Expand All @@ -30,14 +30,14 @@ fly secrets set 'SALES_AGENTS_CONFIG={
{
"id": "test_agent_a2a",
"name": "Test A2A Agent",
"agent_uri": "https://adcp-sales-agent.fly.dev",
"agent_uri": "https://test-agent.adcontextprotocol.org",
"protocol": "a2a",
"requiresAuth": false
},
{
"id": "test_agent_mcp",
"name": "Test MCP Agent",
"agent_uri": "https://adcp-sales-agent.fly.dev/mcp",
"agent_uri": "https://test-agent.adcontextprotocol.org/mcp",
"protocol": "mcp",
"requiresAuth": false
}
Expand All @@ -56,14 +56,14 @@ fly certs add testing.adcontextprotocol.org
### A2A Agent
- **ID**: `test_agent_a2a`
- **Name**: `Test A2A Agent`
- **Endpoint**: `https://adcp-sales-agent.fly.dev`
- **Endpoint**: `https://test-agent.adcontextprotocol.org`
- **Protocol**: `a2a`
- **Auth**: No authentication required for testing

### MCP Agent
- **ID**: `test_agent_mcp`
- **Name**: `Test MCP Agent`
- **Endpoint**: `https://adcp-sales-agent.fly.dev/mcp`
- **Endpoint**: `https://test-agent.adcontextprotocol.org/mcp`
- **Protocol**: `mcp`
- **Auth**: No authentication required for testing

Expand All @@ -85,7 +85,7 @@ curl -X POST https://testing.adcontextprotocol.org/api/test \
{
"id": "test_agent_a2a",
"name": "Test A2A Agent",
"agent_uri": "https://adcp-sales-agent.fly.dev",
"agent_uri": "https://test-agent.adcontextprotocol.org",
"protocol": "a2a",
"requiresAuth": false
}
Expand Down
13 changes: 8 additions & 5 deletions src/a2a-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,14 @@ export async function callA2ATool(
messageId: `msg_${Date.now()}_${Math.random().toString(36).substr(2, 9)}`,
role: "user",
parts: [{
kind: "text",
text: `Please execute ${toolName} with the following parameters: ${JSON.stringify({
brief,
...(promotedOffering && { promoted_offering: promotedOffering })
})}`
kind: "data",
data: {
skill: toolName,
parameters: {
brief,
...(promotedOffering && { promoted_offering: promotedOffering })
}
}
}]
},
configuration: {
Expand Down