Everything you need to know about using CiteFlowAI on Arc Testnet, whether you are researching topics or registering intellectual property.
5042002)— Sandbox test environment with free faucet USDCCiteFlowAI 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.
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!
Since you are currently on the Arc Testnet, you can use the official Circle Faucet to receive free Testnet USDC for testing prompts.
Once your wallet is funded, you can query the AI. You set a "Max Budget" for the prompt (e.g., $0.50).
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!
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.
/.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.Navigate to the Register Work page. Here, you can upload the contents of your research, blog posts, or intellectual property.
The Dashboard provides a live view of your intellectual property.
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.
@circle-fin/x402-batching client library (or any client that implements Circle Gateway's batched signing scheme).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 paidReplace 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.
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.
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.
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.
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.
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.
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"
}
}
}
}CiteFlowAI is built on top of Circle Web3 Services to provide a seamless, gasless experience for non-crypto native users while maintaining decentralized settlement.