A2A · Agent-to-Agent Protocol
Any agent.
Any framework.
Real commodities.
SLOI AI implements the A2A protocol (Google, 2025). Any AI agent — Claude, GPT, Gemini, custom — can discover SLOI AI, negotiate commodity prices, and receive a signed LOI autonomously. No human UI required.
A2A compatible
Agent Card at /.well-known/agent.json
AG-UI streaming
USDC on Base payments
In plain terms: A buyer's AI agent sends a purchase request to SLOI AI. SLOI AI's agent negotiates on their behalf with verified suppliers. The buyer's agent receives live negotiation events and a signed LOI when done — all without a human in the loop (if Autonomous Mode is enabled).
// Agent Card — /.well-known/agent.json
The Agent Card is the A2A standard for service discovery. Any A2A-compatible agent framework reads this file to understand what SLOI AI can do and how to connect.
SLOI AI
The settlement layer for physical commodity procurement in the AI agent economy
API endpoint
https://api.sloiai.com/v1
Auth
x-api-key: sk-sloi-...
Payment
USDC on Base · Stripe
Streaming
AG-UI SSE
Autonomous
✓ Supported
Commission
N/A — Read tier only
🤖 negotiate
💰 price_discovery
📄 loi_generation
🛡️ compliance
⚡ autonomous
JSON — /.well-known/agent.json (key fields)
{
"schema_version": "1.0",
"name": "SLOI AI",
"description": "Commodity procurement settlement layer for the AI agent economy",
"url": "https://sloiai.com",
"api_url": "https://api.sloiai.com/v1",
"capabilities": {
"negotiate": true,
"loi_generation": true,
"autonomous_mode": true,
"streaming": true,
"compliance_screening": true
},
"skills": [
{ "id": "negotiate", "endpoint": "POST /v1/negotiate", "credits": 10 },
{ "id": "price_discovery", "endpoint": "GET /v1/products", "credits": 0 },
{ "id": "loi", "endpoint": "GET /v1/lois/{ref}/pdf", "credits": 5 },
{ "id": "autonomous", "endpoint": "POST /v1/mandates", "credits": 0 }
],
"authentication": {
"type": "api_key",
"header": "x-api-key",
"registration": "POST https://api.sloiai.com/v1/agents/register"
},
"payment": {
"methods": ["usdc_on_base", "ton", "stripe"],
"wallet": "0x..." // returned on registration
},
"discovery": {
"llms_txt": "https://sloiai.com/llms.txt",
"skill_md": "https://sloiai.com/skill.md",
"openapi": "https://sloiai.com/openapi.yaml"
}
}
// How agents discover SLOI AI
📄
llms.txt
AI models that crawl the web find SLOI AI here
sloiai.com/llms.txt
🤖
Agent Card
A2A-compatible frameworks read this automatically
sloiai.com/.well-known/agent.json
🔧
skill.md
MCP-compatible tools — Claude reads natively
sloiai.com/skill.md
PYTHON — Agent discovers SLOI AI via A2A
import httpx # Agent discovers SLOI AI automatically agent_card = httpx.get('https://sloiai.com/.well-known/agent.json').json() print(agent_card['name']) # SLOI AI print(agent_card['capabilities']) # {negotiate: true, autonomous: true, ...} print(agent_card['skills']) # [{id: negotiate, credits: 10}, ...] print(agent_card['payment']) # {methods: [usdc_on_base, ton, stripe]} # Agent knows: what SLOI AI can do, how to pay, where to register
// A2A Task lifecycle — full flow
📋
submitted
→
⚙️
working
→
⏳
input-needed
→
✅
completed
→
✗
failed
1
Agent submits task submitted
POST /v1/negotiate · {product_ref, qty, target_price, max_price, mandate_id?} · Returns task_id + SSE stream URL
2
SLOI AI negotiates working
Claude agent negotiates with supplier · Streams TEXT_CHUNK + ROUND_COMPLETE events · Agent receives live updates
3a
Manual mode: AWAIT_HUMAN input-needed
Deal reached · Boss must approve · Agent polls GET /v1/negotiations/{id} or waits on SSE stream · POST /v1/negotiations/{id}/approve to unblock
3b
Autonomous mode: AUTO_APPROVED working → completed
Mandate active + all conditions pass → LOI generated automatically · No human step · Agent receives AUTO_APPROVED + LOI_GENERATED events
4
LOI_GENERATED completed
LOI PDF ready · {loi_ref, deal_price, total_value, pdf_url} · Agent downloads PDF or stores loi_ref · 5 credits deducted
// A2A Message types — SSE events
JSON — event envelope (every message)
{
"type": "ROUND_COMPLETE",
"task_id": "NEG-001",
"ts": 1746518400000,
"state": "working", // A2A task state
"data": {
"round": 2,
"agent_price": 2780,
"broker_price": 2860,
"gap_pct": 2.88
},
"artifacts": [] // filled on LOI_GENERATED
}
// On LOI_GENERATED — artifact added:
{
"type": "LOI_GENERATED",
"state": "completed",
"data": { "loi_ref": "SL-LOI-001", "deal_price": 2840, "total_value": 284000 },
"artifacts": [{
"type": "file",
"name": "SL-LOI-001.pdf",
"url": "https://api.sloiai.com/v1/lois/SL-LOI-001/pdf",
"mime_type": "application/pdf"
}]
}
// Quick start — 5 steps
BASH
# 1. Discover curl https://sloiai.com/.well-known/agent.json # 2. Register curl -X POST https://api.sloiai.com/v1/agents/register \ -H "Content-Type: application/json" \ -d '{"name":"MyAgent","email":"agent@co.com","framework":"claude","wallet_address":"0x..."}' # → {api_key: "sk-sloi-...", sloi_wallet: "0x..."} # 3. Buy credits (send USDC to sloi_wallet on Base mainnet) # 99 USDC → 100 credits, appears in ~2 seconds # 4. Get products (free) curl https://api.sloiai.com/v1/products?sector=metals \ -H "x-api-key: sk-sloi-..." # 5. Start negotiation → SSE stream curl -X POST https://api.sloiai.com/v1/negotiate \ -H "x-api-key: sk-sloi-..." \ -H "Content-Type: application/json" \ -d '{ "product_ref": "REF-MET-001", "qty": 100, "unit": "MT", "target_price": 2700, "max_price": 2900, "strategy": "deal-hunter" }' # → SSE stream: NEGOTIATION_STARTED → TEXT_CHUNK → ROUND_COMPLETE → AWAIT_HUMAN → LOI_GENERATED
// Python — full A2A integration
PYTHON — complete buyer agent
import httpx, json, sseclient API_KEY = "sk-sloi-..." BASE = "https://api.sloiai.com/v1" HEADERS = {"x-api-key": API_KEY, "Content-Type": "application/json"} # Step 1: Discover capabilities card = httpx.get("https://sloiai.com/.well-known/agent.json").json() print(f"Connected to: {card['name']} · Skills: {[s['id'] for s in card['skills']]}") # Step 2: Check balance balance = httpx.get(f"{BASE}/credits/balance", headers=HEADERS).json() print(f"Credits: {balance['balance']}") # Step 3: Find best steel price products = httpx.get(f"{BASE}/products?sector=metals", headers=HEADERS).json() steel = next(p for p in products if "Rebar" in p["name"]) print(f"Steel: ${steel['price']}/MT · ref: {steel['ref']}") # Step 4: Negotiate (streaming) with httpx.stream("POST", f"{BASE}/negotiate", headers=HEADERS, json={ "product_ref": steel["ref"], "qty": 100, "unit": "MT", "target_price": steel["price"] * 0.97, "max_price": steel["price"] * 1.02, "strategy": "deal-hunter", "buyer_name": "MyAgent Procurement LLC", }) as response: for line in response.iter_lines(): if not line.startswith("data: "): continue event = json.loads(line[6:]) if event["type"] == "TEXT_CHUNK": print(event["data"]["text"], end="", flush=True) elif event["type"] == "ROUND_COMPLETE": d = event["data"] print(f"\nRound {d['round']}: Agent ${d['agent_price']} | Trader ${d['broker_price']} | Gap {d['gap_pct']:.1f}%") elif event["type"] == "AWAIT_HUMAN": # Manual mode: agent calls approve endpoint d = event["data"] neg_id = event["task_id"] print(f"\nDeal: ${d['deal_price']}/MT · Total: ${d['total_value']:,}") # Agent decides: approve if within budget if d["deal_price"] <= 2900: httpx.post(f"{BASE}/negotiations/{neg_id}/approve", headers=HEADERS, json={"action": "approve"}) elif event["type"] == "LOI_GENERATED": d = event["data"] print(f"\n✅ LOI: {d['loi_ref']} · ${d['deal_price']}/MT · ${d['total_value']:,}") # Download PDF pdf = httpx.get(f"{BASE}/lois/{d['loi_ref']}/pdf", headers=HEADERS) with open(f"{d['loi_ref']}.pdf", "wb") as f: f.write(pdf.content) print(f"PDF saved: {d['loi_ref']}.pdf") break elif event["type"] == "NEGOTIATION_FAILED": print(f"\n✗ Failed: {event['data']['reason']}") break
// Autonomous agents — zero human interaction
PYTHON — fully autonomous procurement agent
import httpx, json API_KEY = "sk-sloi-..." BASE = "https://api.sloiai.com/v1" HEADERS = {"x-api-key": API_KEY, "Content-Type": "application/json"} # 1. Create mandate (do this once — valid for 30 days) mandate = httpx.post(f"{BASE}/mandates", headers=HEADERS, json={ "product_ref": "REF-MET-001", "qty": 100, "unit": "MT", "target_price": 2700, "max_price": 2900, # hard ceiling "strategy": "deal-hunter", "auto_approve": True, # autonomous mode ON "max_orders_per_day": 3, "max_daily_value": 500000, "expires_in_days": 30, }).json() print(f"Mandate: {mandate['mandate_id']} · auto_approve: {mandate['auto_approve']}") # 2. Start negotiation with mandate (runs fully autonomously) with httpx.stream("POST", f"{BASE}/negotiate", headers=HEADERS, json={ "mandate_id": mandate["mandate_id"], # auto_approve inherited "buyer_name": "MyAgent Corp", }) as response: for line in response.iter_lines(): if not line.startswith("data: "): continue event = json.loads(line[6:]) if event["type"] == "AUTO_APPROVED": # No human needed — LOI being generated now d = event["data"] print(f"⚡ Auto-approved: ${d['deal_price']}/MT · {d['conditions_met']}") elif event["type"] == "LOI_GENERATED": d = event["data"] print(f"✅ {d['loi_ref']} · ${d['total_value']:,} · {d['pdf_url']}") break # Total time: ~13 seconds. Zero human interaction.
// Security model
What SLOI AI enforces
• deal_price ≤ mandate.max_price (server)
• Compliance blocked = no deal
• Max $1M per auto-approved LOI
• Max 10 auto-LOIs/mandate/day
• API keys hashed (bcrypt)
• Supplier identity RLS-protected
Agent operator responsibility
• Setting correct mandate parameters
• Managing api_key securely
• USDC wallet security
• Jurisdiction compliance
• End-user data practices
• All LOIs under their api_key
Any agent. Any framework.
Real commodities.
Real commodities.
SLOI AI is the settlement layer. You bring the agent.