Open Source
Everything you need to score ads from an AI agent without writing the x402 payment plumbing yourself: ready-made scripts for every major LLM platform, an MCP server, and a Claude plugin. All MIT-licensed on GitHub. Each scoring run costs $5 USDC, paid from your own wallet over the x402 agent API — no PreTestAds account or API key needed.
krecicki/pretestads-agent-scripts
Python + JavaScript clients and tool-use agents for OpenAI, Claude, Gemini, LangChain, CrewAI, and Vercel AI SDK, plus an MCP server and a Claude Code skill.
View on GitHub →
krecicki/pretestads-claude-plugin
Claude plugin marketplace — installs score-ad, check-score, account, and setup skills into Claude Code or Cowork with two commands.
View on GitHub →
Each agent script registers a score_ad tool with the LLM of your choice, using your own provider API key. When the model decides to score an ad, the tool signs the $5 USDC payment locally with your wallet key, submits the ad, waits for the result, and hands the score back to the model to interpret. Python pays on Solana or Base; JavaScript pays on Base via x402-fetch.
| Platform | Python | JavaScript |
|---|---|---|
| Plain CLI (no LLM) | python/score_ad.py | javascript/score-ad.mjs |
| OpenAI function calling | python/openai_agent.py | javascript/openai-agent.mjs |
| Anthropic Claude tool use | python/anthropic_agent.py | javascript/anthropic-agent.mjs |
| Google Gemini | python/gemini_agent.py | javascript/gemini-agent.mjs |
| LangChain | python/langchain_tool.py | javascript/langchainjs-tool.mjs |
| CrewAI | python/crewai_tool.py | — |
| Vercel AI SDK | — | javascript/vercel-ai-tool.mjs |
| Benchmark video download ($0.50) | python/download_benchmark_video.py | javascript/download-benchmark-video.mjs |
The no-LLM CLIs score an ad directly from your terminal — handy for cron jobs and CI pipelines:
# Python (Solana or Base)
cd python && pip install -r requirements.txt
SOLANA_PRIVATE_KEY=<base58> python score_ad.py https://example.com/ad.mp4
# Node (Base)
cd javascript && npm install
EVM_PRIVATE_KEY=0x... node score-ad.mjs ~/Desktop/ad.mp4The fastest path if you use Claude: two commands install four skills — score-ad (submit video, image, audio, or text ads), check-score (poll a run and interpret the attention curve), pretestads-account (credits and history via API key), and pretestads-setup (save your keys once). Then just say "score my ad" in any session.
/plugin marketplace add krecicki/pretestads-claude-plugin
/plugin install pretestads@pretestadsThe plugin pays per run with a crypto wallet via x402 (no account), or uses your PreTestAds API key and account credits — which also unlocks audio and text ad scoring, history, and conversion tracking.
The mcp-server directory exposes ad scoring as MCP tools, so any MCP-capable client can score ads. Point your client's MCP config at it:
{
"mcpServers": {
"pretestads": {
"command": "node",
"args": ["/path/to/pretestads-agent-scripts/mcp-server/server.mjs"],
"env": { "EVM_PRIVATE_KEY": "0x..." }
}
}
}The full x402 endpoint reference — request shapes, payment flow, and response format — lives in the agent API guide. A machine-readable summary is at /llms.txt.
Read the Agent API Guide