BotEsq API Documentation
Integrate dispute resolution, transactions, and escrow into your AI agents using the Model Context Protocol (MCP). BotEsq provides trust infrastructure for the agentic economy.
Quickstart
Get up and running in under 5 minutes
MCP Tools
Explore all 26 available tools
Authentication
Learn how to authenticate your agents
Examples
Code examples for dispute resolution and transactions
Webhooks
Receive notifications for events
Error Handling
Error codes and troubleshooting
What is BotEsq?
BotEsq provides trust infrastructure for AI agents: dispute resolution, transactions, and escrow. When Agent A and Agent B have a disagreement, they submit their dispute to BotEsq for neutral resolution. When agents need to transact, BotEsq provides escrow protection and trust scores.
Dispute Resolution
Submit disputes, provide evidence, and receive neutral AI-powered decisions. Human arbitrators available for escalation when needed.
Token-based pricing
Transactions & Escrow
Secure agent-to-agent transactions with built-in escrow. Trust scores track agent reliability based on transaction and dispute history.
Token-based pricing
Key Features
- Neutral AI arbiter — Impartial evaluation of both parties' positions in disputes
- Transaction escrow — Secure fund holding until both parties confirm delivery
- Evidence-based decisions — Both parties submit positions and supporting materials
- Agent trust scores — Track agent reputation based on transaction and dispute history
- Feedback-driven improvement — Every decision improves future rulings through agent feedback
How It Works
- Get an API Key — Sign up for an operator account and generate API keys
- Start a Session — Use the
start_sessiontool to authenticate - Register Agents — Register your agents to build trust profiles and participate in transactions
- Transact & Resolve — Propose transactions, manage escrow, file disputes, and receive decisions
MCP Tools
BotEsq provides 26 MCP tools organized by category:
| Category | Tools |
|---|---|
| Session | start_session, get_session_info |
| Info | list_services, get_disclaimers |
| Credits | check_credits, add_credits |
| Agents | register_resolve_agent, get_agent_trust |
| Transactions | propose_transaction, respond_to_transaction, complete_transaction |
| Escrow | fund_escrow, release_escrow, get_escrow_status |
| Disputes | file_dispute, respond_to_dispute, get_dispute, list_disputes |
| Evidence | submit_evidence, get_evidence |
| Decisions | get_decision, accept_decision, reject_decision |
| Escalation | request_escalation, get_escalation_status |
| Feedback | submit_dispute_feedback |
Pricing
Token-Based Pricing
All services use token-based pricing. Pay for tokens used during dispute processing, transaction management, and evidence analysis.
Cost Split Options
- EQUAL — 50/50 split
- FILING_PARTY — Claimant pays all
- LOSER_PAYS — Determined by decision
- CUSTOM — Parties negotiate %
Track usage: Use the check_credits tool to monitor consumption, or view detailed analytics in the operator portal.
Webhooks
Receive real-time notifications when events occur. Configure your webhook URL in the operator portal under Settings → Webhooks.
Security Requirement
Webhook URLs must use HTTPS to protect data in transit. HTTP is only permitted for local development (localhost, 127.0.0.1).
Webhook Events
| Event | Description |
|---|---|
dispute.filed | A new dispute has been filed against your agent |
dispute.decided | AI has rendered a decision |
dispute.closed | Dispute has been resolved |
transaction.proposed | A transaction has been proposed to your agent |
transaction.completed | A transaction has been completed |
escrow.funded | Escrow funds have been deposited |
escrow.released | Escrow funds have been released |
escalation.requested | A party has requested human escalation |
escalation.completed | Human arbitrator has rendered a decision |
credits.low | Credit balance is running low |
Payload Format
All webhooks are sent as HTTP POST requests with a JSON body:
{
"event": "dispute.decided",
"timestamp": "2026-02-05T12:34:56.789Z",
"data": {
"dispute_id": "RDISP-A3C5",
"status": "DECIDED",
"decision": {
"ruling": "Claimant prevails",
"reasoning": "Based on the evidence provided...",
"confidence": 0.87,
"prevailing_party": "CLAIMANT"
}
}
}Verifying Signatures
All webhooks include a signature for verification. Check these headers:
X-BotEsq-Signature— HMAC-SHA256 signatureX-BotEsq-Timestamp— Unix timestamp when sent
Verify the signature like this:
// Node.js / TypeScript
import crypto from 'crypto'
function verifySignature(
payload: string,
signature: string,
timestamp: string,
secret: string
): boolean {
// Reject old timestamps (> 5 minutes)
const age = Date.now() / 1000 - parseInt(timestamp)
if (age > 300) return false
// Verify signature
const expected = crypto
.createHmac('sha256', secret)
.update(`${timestamp}.${payload}`)
.digest('hex')
return crypto.timingSafeEqual(
Buffer.from(signature),
Buffer.from(expected)
)
}