ARC-TESTNET · LIVE✦ANSWERS SERVED: 138✦PAID TO CREATORS: $22.59 USDC✦AVG ANSWER COST: $0.20✦REGISTERED SOURCES: 21✦PAY-PER-PROMPT · NO SUBSCRIPTIONS✦CIRCLE W3S · USDC SETTLEMENTS✦

Documentation

Viewing for:

Everything you need to know about using CiteFlowAI on Arc Testnet, whether you are researching topics or registering intellectual property.

Arc Testnet (Chain ID: 5042002)— Sandbox test environment with free faucet USDC
ARC-TESTNET

What is CiteFlowAI?

CiteFlowAI is a decentralized AI research terminal designed to fix the creator compensation problem in generative AI. Currently, AI models are trained on millions of articles, but the original authors receive no compensation when their work is used to generate answers.

CiteFlowAI changes this by introducing Pay-Per-Prompt Citations. When our AI agent synthesizes an answer using a registered knowledge base, it explicitly cites its sources and uses Circle Programmable Wallets to instantly execute USDC nanopayments to the original creators on Arc Testnet.

For Researchers (Users)

1. Connect a Web3 Wallet (No Seed Phrase Needed)

You don't need a crypto extension like MetaMask to use CiteFlowAI. We use Circle's User-Controlled Wallets to generate a secure Web3 wallet bound to your email address, which acts as your universal login!

  • Click Connect Wallet in the top navigation bar.
  • Enter your email address and verify with the One-Time Password (OTP).
  • Create a secure PIN code to authorize future transactions.
  • You are now authenticated on Arc Testnet! Your wallet address is your identity.

2. Get Free Testnet USDC (Faucet)

Since you are currently on the Arc Testnet, you can use the official Circle Faucet to receive free Testnet USDC for testing prompts.

  • Copy your connected wallet address from the top navigation bar.
  • Click the blue Droplet Icon in the navigation bar to open the Circle Faucet.
  • Paste your address and request USDC on the Arc Testnet.
  • Wait a few seconds, and your balance will automatically update in the app!

3. Ask the AI

Once your wallet is funded, you can query the AI. You set a "Max Budget" for the prompt (e.g., $0.50).

  • The funds are temporarily authorized using your PIN code.
  • The AI retrieves relevant articles from our vector database and writes an answer.
  • Based on which articles were actually cited, the settlement occurs, distributing the exact citation fees to the respective authors on Arc Testnet.

For Creators (Authors)

1. Universal Identity (Circle + Supabase)

There are no separate "user" or "creator" accounts, and absolutely no passwords. Your Circle Wallet is your entire identity. The moment you connect your wallet via the navbar, our backend automatically maps your address to your creator profile for the active network (Arc Testnet). You never have to manually configure payment settings!

2. Verify Ownership (Required Before Registering)

Before you can register an article, you must prove you actually control where it lives. This exists so nobody else can register your work and collect the citation payments meant for you — CiteFlowAI will not create a source from a domain or platform handle you haven't verified, full stop.

  • Open the Verify Ownership panel on your Dashboard — it shows a unique verification code tied to your account.
  • Prove control of a domain (add a meta tag or a /.well-known/citeflow.txt file with the code), an X account (post the code in a tweet), a Medium profile, a Substack, or an Arc House account (publish the code in a post on a public board) — then paste the link back into the panel.
  • Once verified, that identity is permanently and exclusively yours on Arc Testnet — enforced at the database level, not just in the UI. You can then register any article on that domain or handle without repeating this step.
  • You can verify as many domains and platforms as you actually own; there's no limit.

3. Registering Articles

Navigate to the Register Work page. Here, you can upload the contents of your research, blog posts, or intellectual property.

  • Provide the Title, URL, and the full content of your article.
  • Set your own Citation Price in USDC, up to a maximum of 1 USDC per citation on both testnet and mainnet.
  • Your content is chunked, embedded into our Vector Database, and made available to the AI agent on Arc Testnet.

4. Tracking Earnings

The Dashboard provides a live view of your intellectual property.

  • View all your registered articles on Arc Testnet.
  • See exactly how many times each article has been cited by the AI.
  • Watch your USDC balance grow in real-time as users and autonomous agents interact with the network.

For Agents & Developers (x402 API)

CiteFlowAI can also be called directly by other autonomous agents — no CiteFlow account, API key, or PIN prompt. The/api/agent/researchendpoint speaks the x402 protocol: send a request with no payment and it returns an HTTP 402 challenge; retry with a signed, gasless payment authorization and it settles the payment and returns a grounded, cited answer in one round trip.

Direct SDK requirements (Arc Testnet)

  • Any standard EVM keypair — this isn't tied to Circle's wallet product; a plain private key works.
  • USDC and native gas on Arc Testnet, obtainable free from the Circle Faucet.
  • For direct SDK integrations, a one-time on-chain deposit into Circle's Gateway contract is required. Holding USDC alone isn't enough — it must be deposited into Gateway before any signed authorization can spend it. This step costs gas; every payment after it is gasless. The MCP integration performs this deposit automatically when needed.
  • The @circle-fin/x402-batching client library (or any client that implements Circle Gateway's batched signing scheme).

Try it from scratch (Arc Testnet)

A complete, standalone example configured for Arc Testnet:

mkdir citeflow-test && cd citeflow-test
npm init -y
npm install @circle-fin/x402-batching

Save this as test-x402.mjs:

import { GatewayClient } from '@circle-fin/x402-batching/client'

const client = new GatewayClient({
  chain: 'arcTestnet',
  privateKey: '0xYOUR_PRIVATE_KEY',
  rpcUrl: 'https://rpc.testnet.arc.network',
})

await client.deposit('1.00') // one-time, funds your Gateway balance

const { data } = await client.pay(
  'https://citeflowai.xyz/api/agent/research?q=' +
    encodeURIComponent('your research question here')
)

console.log(data.answer)            // grounded, cited answer
console.log(data.purchasedSources)  // which creators just got paid

Replace 0xYOUR_PRIVATE_KEY and 'your research question here' with your own values first.

Then run it:

node test-x402.mjs

Each call is a fixed $1.00 USDC budget. Whatever isn't spent on citations is refunded back to the paying wallet. Citation payments to creators are executed on Arc Testnet.

Recommended: OKX Agentic Wallet (ARC-TESTNET)

OKX Agentic Wallet is the recommended wallet path for agent-to-agent CiteFlowAI research on Arc Mainnet right now. In mainnet testing, this flow handled the paid research request and unspent-budget refund more cleanly than Circle Agent Wallet's current Gateway-backed agent-wallet flow.

  1. Fund the OKX agent wallet with USDC on Arc Testnet.
  2. Have the agent call the CiteFlowAI x402 research endpoint with the research question.
  3. The endpoint returns an HTTP 402 payment challenge.
  4. OKX Agentic Wallet signs and submits the payment.
  5. CiteFlowAI runs the research, pays cited creators, and refunds any unspent budget to the paying wallet.

Use the same endpoint shown above:/api/agent/research?q=YOUR_ENCODED_QUESTION. The Circle-onlyrefundAddressparameter is not required for the OKX Agentic Wallet path.

For public mainnet demos, use OKX Agentic Wallet, the direct SDK example, or the MCP integration below. Keep Circle Agent Wallet mainnet tests internal until its Gateway refund/reconciliation path is hardened.

Circle Agent Wallet (ARC-TESTNET) — testnet sandbox only

On Arc Testnet, Circle Agent Wallet remains useful for sandbox testing with test USDC. The same refund-address rule still applies so the endpoint can return unspent test budget to the Agent Wallet SCA instead of the backing EOA.

Testnet note: testnet uses fake USDC, so it is safe for Circle Agent Wallet experiments. Do not treat testnet behavior as proof that the Arc Mainnet refund path is production-ready.
Circle Agent Wallet testnet command

The endpoint URL must includerefundAddress=0xYOUR_AGENT_WALLET_ADDRESS. Use the same Circle Agent Wallet SCA that you pass to--address. Do not use the backing EOA/signer address.

circle services pay \
  "https://citeflowai.xyz/api/agent/research?q=YOUR_ENCODED_QUESTION&refundAddress=0xYOUR_AGENT_WALLET_ADDRESS" \
  --address 0xYOUR_AGENT_WALLET_ADDRESS \
  --chain ARC-TESTNET \
  --estimate \
  --output json

To execute after estimating, run the same command without--estimateand add--max-amount 1 --timeout 120. This Circle Agent Wallet method is different from the direct SDK/MCP examples above because Circle Gateway signs with a backing EOA while refunds must go to the Agent Wallet SCA.

Read the complete Circle Agent Wallet guide

Even easier: MCP integration

If your agent runs on MCP (Claude, Codex, Antigravity, OpenCode, Cursor, or your own agent framework), you don't need to write any x402 signing code at all. We publish a small, self-contained MCP server — mcp-server/ in the CiteFlow repo — that exposes the endpoint as a single tool: citeflow_research. It handles the Gateway deposit, signing, and payment internally; your agent just calls the tool with a question.

Set a longer tool-call timeout.A real call settles an on-chain payment and typically takes 60–100+ seconds. Most MCP clients default to a 60-second tool-call timeout, right at the edge of that, so calls will intermittently fail with a timeout error even though nothing is wrong. Set your client's per-server timeout to at least 3 minutes; the exact field is shown for each client below.

Setup:

git clone https://github.com/vickman787/citeflowAI
cd citeflowAI/mcp-server
npm install
export CITEFLOW_PRIVATE_KEY=0xYOUR_PRIVATE_KEY

Then point your MCP client at it, e.g. in Claude Desktop's config:

{
  "mcpServers": {
    "citeflow": {
      "command": "node",
      "args": ["/absolute/path/to/mcp-server/index.mjs"],
      "timeout": 180000,
      "env": {
        "CITEFLOW_PRIVATE_KEY": "0xYOUR_PRIVATE_KEY",
        "CITEFLOW_RESEARCH_URL": "https://citeflowai.xyz/api/agent/research"
      }
    }
  }
}

Restart your client and ask it to research something — it calls citeflow_research on its own when relevant.

Works the same with Codex, Antigravity, and OpenCode

Same server, same tool — CLI, IDE extension, or desktop app all work. Only the config format and location differ, since each client is a separate, independently-built product.

Claude Code (CLI or VS Code extension) uses the identical .mcp.json format shown above — same file, same shape, whether it's the desktop app, CLI, or extension.

Codex (CLI or IDE extension) uses TOML at ~/.codex/config.toml:

[mcp_servers.citeflow]
command = "node"
args = ["/absolute/path/to/mcp-server/index.mjs"]
tool_timeout_sec = 180

[mcp_servers.citeflow.env]
CITEFLOW_PRIVATE_KEY = "0xYOUR_PRIVATE_KEY"
CITEFLOW_RESEARCH_URL = "https://citeflowai.xyz/api/agent/research"

Antigravity (desktop app or CLI) uses the same JSON shape as Claude, but config at ~/.gemini/config/mcp_config.json, or workspace-local at .agents/mcp_config.json.

OpenCode (CLI) uses opencode.json:

{
  "$schema": "https://opencode.ai/config.json",
  "mcp": {
    "citeflow-research": {
      "type": "local",
      "command": ["node", "/absolute/path/to/mcp-server/index.mjs"],
      "enabled": true,
      "timeout": 180000,
      "environment": {
        "CITEFLOW_PRIVATE_KEY": "0xYOUR_PRIVATE_KEY"
      }
    }
  }
}

Circle Web3 Architecture

CiteFlowAI is built on top of Circle Web3 Services to provide a seamless, gasless experience for non-crypto native users while maintaining decentralized settlement.

  • User-Controlled Wallets: We use Circle's Web SDK to generate embedded wallets via Email OTP. No seed phrases are required.
  • Master Treasury Escrow:To prevent forcing researchers to manually sign 5 separate transactions to pay 5 different authors, CiteFlowAI uses a Master Treasury Wallet. Researchers sign a single PIN-authorization for their "Max Budget" which is routed to the Treasury.
  • Programmatic Smart Contract Routing:Once the AI agent finishes a task and determines which sources were cited, our backend securely uses Circle's Developer-Controlled Wallets API to execute batch nanopayments from the Treasury directly to the cited authors.
  • Arc Testnet: All transactions are executed securely on Arc Testnet (Chain ID: 5042002) using USDC.