Skip to main content

A2A Protocol Integration

The Resonance Reward Agent supports Google's Agent-to-Agent (A2A) protocol v0.3 for synchronous task execution between agents.

Endpoints

MethodPathDescription
GET/.well-known/a2a/agent-cardAgent card with skill definitions
POST/tasks/sendExecute a skill synchronously
GET/tasks/{taskId}Retrieve a cached task result

Agent Card Discovery

curl https://agent.rsnc.network/.well-known/a2a/agent-card

Returns the agent's skills, auth schemes, and interfaces.

Available Skills

Commerce Skills (Public)

Skill IDDescriptionAuth Required
route_purchaseFind the best brand for a purchase based on cashbackNo
compare_cashbackSide-by-side cashback comparison across brandsNo
best_dealsSmart deal matching by shopping intentNo

Loyalty Skills (Authenticated)

Skill IDDescriptionAuth Required
check_rewardsCheck user reward balance and statsYes
apply_loyaltyCalculate optimal deal stackYes
track_purchaseRecord a purchase to earn cashbackYes

Brand Management Skills (Authenticated + Permissions)

Skill IDDescriptionAuth Required
manage_programCreate/update reward events and perksYes
view_analyticsView brand analytics and performanceYes
onboard_brandRegister a new brand on the networkYes

Making Requests

Public Skill (No Auth)

curl -X POST https://agent.rsnc.network/tasks/send \
-H "Content-Type: application/json" \
-d '{
"message": {
"role": "user",
"parts": [{
"type": "data",
"mimeType": "application/json",
"data": {
"skill": "route_purchase",
"intent": "running shoes",
"purchaseAmount": 150
}
}]
}
}'

Authenticated Skill (HMAC)

curl -X POST https://agent.rsnc.network/tasks/send \
-H "Content-Type: application/json" \
-H "X-RSNC-Agent-Key: your-key-id" \
-H "X-RSNC-Timestamp: $(date +%s)" \
-H "X-RSNC-Signature: <computed-signature>" \
-d '{
"message": {
"role": "user",
"parts": [{
"type": "data",
"mimeType": "application/json",
"data": {
"skill": "check_rewards",
"brandId": "0xYourBrandId",
"userId": "[email protected]"
}
}]
}
}'

Response Format

Successful responses return an A2A Task object:

{
"id": "uuid",
"contextId": "uuid",
"status": {
"state": "completed",
"timestamp": "2026-03-04T00:00:00Z"
},
"messages": [
{ "role": "user", "parts": [...] },
{ "role": "agent", "parts": [{ "type": "text", "text": "Skill completed." }] }
],
"artifacts": [{
"id": "uuid",
"parts": [{
"type": "data",
"mimeType": "application/json",
"data": { "brands": [...], "recommendation": "..." }
}]
}],
"metadata": {},
"createdTime": "2026-03-04T00:00:00Z",
"updatedTime": "2026-03-04T00:00:00Z"
}

Task States

StateMeaning
completedSkill executed successfully
failedSkill execution failed (tool error)
rejectedRequest rejected (unknown skill, auth failure)

Retrieving Tasks

Tasks are cached for 5 minutes after completion:

curl https://agent.rsnc.network/tasks/{taskId}

Returns the full Task object, or 404 if expired/not found.

Authentication

See HMAC Authentication for details on computing signatures.

For user identity linking (checking rewards for a specific user), you can also include an OAuth 2.0 Bearer token via the Authorization header alongside HMAC credentials.