ap2
Installation
bun add @regent/ap2Basic Usage
import { createAgent } from '@regent/core';
import { http } from '@regent/http';
import { payments } from '@regent/x402';
import { ap2 } from '@regent/ap2';
const agent = await createAgent({
name: 'my-agent',
version: '1.0.0',
})
.use(http())
.use(payments({ config: paymentsConfig }))
.use(ap2({ roles: ['merchant'] }))
.build();API Reference
ap2(options?)
AP2Config
AP2Runtime
AP2 Roles
Role
Purpose
Use Case
Single Role
Multiple Roles
Manifest Integration
Default required Behavior
required BehaviorManual Card Enhancement
Detecting AP2 Support
Integration Examples
Payment Receiver (Merchant)
Payment Sender (Shopper)
Bidirectional Trading Agent
AP2 and A2A Relationship
Aspect
A2A
AP2
Exports
Last updated