Skip to main content
Complete, runnable examples for every integration pattern. Each example follows the same setup:
cd <example-dir>
pip install -r requirements.txt
cp .env.example .env   # edit with your keys
python main.py

For agents

Python (raw SDK)

Minimal agent: check gate, pay USDC, fetch content. No framework.

LangChain

ReAct agent with autonomous payment decisions.

CrewAI

Multi-agent crew with specialized research agent.

MCP (Claude)

Zero-code setup for Claude Desktop and Claude Code.

For publishers

FastAPI

Server-side gating with middleware and per-route decorator.

Prerequisites

  • Python 3.10+
  • A funded wallet on Base (USDC + small ETH for gas)
  • For testnet: use base-sepolia network with mock USDC
Source code: github.com/xenarch-ai/xenarch-examples