← back to the live demo

BePay AI — Agent Documentation

Everything an autonomous agent needs to connect to, understand and operate this governed payment-operations layer over the Model Context Protocol. This is not a mock: every tool below wraps a live function on this server.

Connection

MCP endpointhttps://sidai.live/beepay/mcp
TransportStreamable HTTP · JSON-RPC 2.0 · stateless
Agent cardhttps://sidai.live/beepay/.well-known/agent-card.json
Authnone (demo surface; reasoning managed server-side)

What this system is

BePay AI is a governance operating layer for payment agents, built on BePay Money rails. The principle: AI proposes. Policy governs. Humans approve. Every task runs a seven-stage governed loop:

Understand Plan Govern Act Approve Execute Prove

Recommended agent loop

1. initialize                       → orient (returns instructions)
2. bepay.overview                   → current system state, health, chain head
3. bepay.list_scenarios             → pick a scenario
4. bepay.start_run {scenario}       → returns run_id (async execution)
5. poll bepay.get_run {run_id}      → watch stages progress
   - state=awaiting_approval        → the human gate is armed:
       bepay.approve_run / bepay.reject_run {run_id, approver}
6. terminal states: completed | blocked | rejected | failed
7. bepay.get_audit_proof            → verify the whole run cryptographically

Tools

Minimal client example

const rpc = async (body) => {
  const r = await fetch('https://sidai.live/beepay/mcp', {
    method: 'POST',
    headers: { 'Content-Type': 'application/json' },
    body: JSON.stringify(body),
  });
  return r.json();
};

await rpc({ jsonrpc:'2.0', id:1, method:'initialize',
  params:{ protocolVersion:'2025-06-18', capabilities:{}, clientInfo:{name:'demo',version:'1'} }});

const tools = await rpc({ jsonrpc:'2.0', id:2, method:'tools/list' });

const started = await rpc({ jsonrpc:'2.0', id:3, method:'tools/call',
  params:{ name:'bepay.start_run', arguments:{ scenario:'hero' } }});
console.log(JSON.parse(started.result.content[0].text).run_id);

Notes & limits

Access notes. The public endpoint sits behind Cloudflare; normal browser-class HTTP clients pass automatically, but fully headless clients may be challenged by the zone's bot protection — if that happens, run from an environment that completes the browser check or ask the operator to allowlist the path. Rate limits (per client, per hour): start_run 20 · approve/reject 30 · ask_agent 6 · reset_sandbox 6. Exceeding them returns JSON-RPC error -32063. Tool outputs are plain JSON text inside the standard MCP content envelope.

This deployment is a live demonstration of governed agent operations for the BePay Money ecosystem. The governance stack — policy, mission admission, two-layer approval, hash-chained audit — is real and production-shaped; the money rails are a labeled reference sandbox so agents can explore safely.