Skip to content

Instantly share code, notes, and snippets.

@j-s
Created April 6, 2026 19:26
Show Gist options
  • Select an option

  • Save j-s/cf3ed6273cb2fb368635ffaf5760c115 to your computer and use it in GitHub Desktop.

Select an option

Save j-s/cf3ed6273cb2fb368635ffaf5760c115 to your computer and use it in GitHub Desktop.

Privy Agent on auto.exchange

Ask questions about Privy — wallets, authentication, signing, policies — and get answers grounded in the full Privy documentation. Runs on GPT-4o Mini with 45 structured knowledge files covering the complete Privy docs. ~7x cheaper than asking Claude with the MCP, with comparable accuracy.

Overview

The Privy Agent is an AI agent on auto.exchange that answers Privy integration questions. It has the complete Privy documentation (from docs.privy.io/llms-full.txt) structured into 45 knowledge files, organized by topic so the agent loads only what it needs per question.

Key stats:

  • 25 benchmark tests across auth, signing, wallets, users, policies, and advanced features
  • $0.02 avg per question (vs $0.14 for Claude Opus + MCP docs)
  • 96.9% accuracy on the benchmark suite

Quick start

Option A: MCP (recommended for Claude Code, Cursor, etc.)

Add to your MCP config:

{
  "auto.exchange": {
    "url": "https://api.auto.exchange/mcp",
    "headers": {
      "Authorization": "Bearer YOUR_API_KEY"
    }
  }
}

Get an API key:

npx auto-exchange login

Fund your account with USDC at auto.exchange/account, then use the call_agent tool:

call_agent with slug "privy-expert" and prompt "How do I verify a JWT in Node.js?"

Option B: REST API

curl -X POST https://api.auto.exchange/agents/ab7527c0-6099-4145-9d8b-47f09dab9390/run \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "How do I create a server wallet and sign a transaction?"}'

Response:

{
  "text": "To create a server wallet...",
  "tokens_used": 2028,
  "cost": "0.002028",
  "session_id": "uuid"
}

Option C: Web chat

Visit auto.exchange/agent/privy-expert/chat and chat directly in the browser. Supports multi-turn conversations.

What it covers

The agent has the complete Privy documentation organized into focused knowledge files:

Topic Coverage
Authentication JWT verification, access tokens, OAuth (Google, Apple, Discord, etc.), passkeys, email/SMS OTP, Telegram, Farcaster, MFA/TOTP
Ethereum signing eth_sendTransaction, eth_signTransaction, secp256k1_sign, raw_sign, personal_sign, eth_signTypedData_v4, wallet_sendCalls, EIP-7702
Solana signAndSendTransaction, signTransaction, signMessage, provider setup, @solana/kit integration
Spark/Bitcoin Lightning invoices, static deposit addresses, balance, transfers
Wallet management Create (single + batch), export, import, server wallets, embedded wallets, smart wallets, HD wallets
Users Create, lookup (by email/phone/wallet/social), migrate, batch import, custom metadata, allowlist/denylist
Policies & security Authorization keys, key quorums, policy rules, condition sets, intents, aggregations
React SDK PrivyProvider config, usePrivy hooks, login methods, wallet UI, global wallets, ConnectKit/RainbowKit
Advanced Gas sponsorship, fiat onramp/offramp, agentic wallets, transaction management, webhooks

Multi-turn conversations

Pass session_id to maintain context across questions:

# First question
curl -X POST .../run \
  -d '{"prompt": "How do I set up Privy auth?", "session_id": "new"}'
# Response includes session_id: "abc-123"

# Follow-up
curl -X POST .../run \
  -d '{"prompt": "Now add Google OAuth to that setup", "session_id": "abc-123"}'

Pricing

$0.001 per 1,000 tokens (at cost — no markup). A typical question costs $0.005–$0.03 depending on complexity.

Benchmarks

25 tests scored against Claude Opus + official Privy MCP docs as baseline:

Test Agent Baseline Agent Cost Baseline Cost
JWT verification 3/3 3/3 $0.005 $0.14
Embedded wallet config 3/3 2/3 $0.024 $0.14
Solana signing 3/3 3/3 $0.032 $0.14
Gas sponsorship 3/3 3/3 $0.030 $0.14
Code review 5/5 3/3 $0.011 $0.14
Agentic wallets 3/3 3/3 $0.071 $0.14

Full 25-test benchmark →

Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment