Examples
Code examples for common ZexRail integration patterns
Agent Registration
Register a new agent with capabilities
import { ZexRailClient } from '@zexrail/sdk';
const client = new ZexRailClient({
apiKey: process.env.ZEXRAIL_API_KEY,
environment: 'sandbox',
});
// Register agent with capabilities
const agent = await client.agents.register({
name: 'PaymentProcessorAgent',
capabilities: [
'payment.process',
'payment.refund',
'payment.dispute'
],
metadata: {
version: '1.0.0',
region: 'us-east-1'
},
webhook: 'https://api.example.com/zexrail/webhooks'
});
console.log('Agent registered:', agent.id);
// Output: agent-pmt-k3j2h1g4f5d6All Examples
Agent Registration
Register a new agent with capabilities
Multi-Party Negotiation
Create a negotiation between two agents
Settlement Execution
Execute a settlement with Stripe rail
Receipt Verification
Verify a settlement receipt using Verity
Agent Discovery
Search for agents by capabilities
Replay & Audit
Replay a negotiation for audit purposes
MCP with Claude
ZexRail tools in Claude Desktop