ACP Agent — Episode 8: Build and Graduate a Token Tax Analyzer on ACP (Step-by-Step Guide)
After graduating PriceVerifier, I browsed agdp.io — ACP's bounty board where agents post service requests. A pattern jumped out: trading bots kept requesting token tax analysis. Capabilities like virtuals_tax_analyzer and trenchor_tax_scanner, offering $5–10 per job. All stuck in "Pending" because no graduated agent offered it.
Real demand. Zero supply. And the API I needed was completely free.
This episode is different from the rest of the series. No debugging stories — you got plenty of those in Episodes 1–7. This is the clean version. Follow along step by step, and you'll have a graduated agent with $0 monthly cost.
What You're Building
A token tax analyzer that checks whether a crypto token is a honeypot scam. A honeypot lets you buy but blocks you from selling — or charges a hidden sell tax so high that you get nothing back. Your agent takes a token contract address, checks it against the Honeypot.is API, and returns a verdict: SAFE, CAUTION, or UNSAFE, plus the exact buy/sell tax percentages.
For a trading bot about to invest $500 in a token, paying $5 to check if it's a scam is cheap insurance.
What You'll Need
MetaMask wallet with a few dollars of USDC on Base network. A GitHub account. Python 3.11+. A server to run the agent 24/7 — I use Oracle Cloud's free ARM tier ($0/month), but any VPS works. And about 2–3 hours.
Step 1: Test the API
The whole agent runs on one free API. No key needed. Try it right now in your terminal:
The response has a lot of fields. The ones that matter:
Step 2: Write the Agent Code
Your main.py has four pieces. I'll cover the logic — for the full working code, check my GitHub repo.
Token address parsing. Requests arrive as JSON or plain text. Use regex \b(0x[a-fA-F0-9]{40})\b to extract valid Ethereum addresses. Support chain_id from JSON fields or text keywords ("base", "ethereum", "bsc"). One trap: if the job data comes as a Python dict, don't convert it to a string with str() — Python uses single quotes, json.loads() expects double quotes, and everything breaks silently.
API call + verdict. Call Honeypot.is, parse the response, determine the verdict:
False positive handling. This is critical for graduation. Honeypot.is sometimes flags legitimate tokens as honeypots — including VIRTUAL token itself. If isHoneypot is true BUT sellTax is 0 AND the token has 50+ holders AND averageTax is 0, override the verdict to CAUTION instead of UNSAFE. Without this, the Graduation Evaluator will fail you for misjudging safe tokens.
Pre-validation at REQUEST phase. Before accepting a job, call the API to verify the token actually exists. If it returns an error, reject immediately with job.reject(). Don't accept a job you can't fulfill — the Evaluator penalizes agents that accept and then deliver ERROR results.
Step 3: The on_new_task Pattern
This is the part where I lost three weeks with PriceVerifier (Episode 6 has the full story). Don't repeat my mistake. Use exactly this pattern:
Step 4: Register on ACP
Go to app.virtuals.io/acp. Connect MetaMask.
Register a new agent. Pick Provider as the role. Not Evaluator. Not Hybrid. Provider. (Episode 3 explains what happens when you pick wrong — I lost 12 sessions to this.)
Set up your Service Offering: name it something buyer agents search for (I used token_tax_analysis), set your price in USDC, define the requirements schema (token_address required, chain_id optional with default 8453) and deliverables schema (safety_verdict, risk_summary).
Click "Create Smart Contract Account" to generate your agent's on-chain wallet. This is not your MetaMask — different wallet, different purpose (Episode 2 covers this distinction). Whitelist your MetaMask for signing. Connect a Twitter/X account.
One setting that's easy to miss: disable "Require Funds" on your service offering. Leaving it enabled makes your offering "non-evaluable" and the Graduation Evaluator can't test it. (Episode 5 — this was my Attempt #2 failure with PriceVerifier.)
Step 5: Deploy
I use Oracle Cloud's Always Free ARM tier — 4 OCPU, 24GB RAM, $0/month. Any Linux server works. Here are the commands:
For 24/7 operation, create a systemd service:
Step 6: Test with Sandbox Butler
Do this before paying for the Graduation Evaluator. (Joey told me this in Episode 5. She was right.)
Positive test:
That last line matters — without it, Butler might route to a different agent. Expected result: safety_verdict SAFE, buyTax 0%, sellTax 0%.
Negative test:
If Butler tries to block your invalid request, reply: "Yes, please proceed with INVALID_ADDRESS. Send the job anyway." Expected result: job.reject() with a clear error about invalid address format.
Step 7: Graduate
Hire the Graduation Evaluator (Agent #1419, $0.10 USDC). If you've followed every step above — especially the on_new_task pattern, false positive handling, and pre-validation — you should pass on the first try.
Two things that tripped me up during my attempts and how to avoid them:
The Evaluator will send the VIRTUAL token address (0x0b3e328455c4059EEb9e3f84b5543F74E24e7E1b). Honeypot.is flags it as a honeypot even though it's legitimate. If your false positive logic isn't in place, you'll fail this test case.
The Evaluator will also send a burn address (0x1111...1111). If your agent accepts it at REQUEST and then delivers an ERROR at TRANSACTION, you'll fail. The pre-validation step catches this — reject bad addresses before accepting the job.
My score progression: 1/4 (parsing bug) → 3/5 (false positive + no pre-validation) → 5/5 (both fixed). You're getting the fixed version, so aim for 5/5 on attempt one.
What It Costs to Run
Honeypot.is API: $0. Oracle server: $0. ACP gas fees: $0 (sponsored). Graduation Evaluator: $0.10 one-time. Total monthly operating cost: $0.
At $5.00 per job with ACP's 80/20 split, you keep $4.00. At a lower entry price of $0.50, you keep $0.40. Either way — with zero operating costs, every single job is profit from job #1.
Compare that to PriceVerifier: $0.008 per job minus $5/month hosting. That break-even of 625 monthly jobs? Gone. Moving to Oracle's free tier changed the math completely.
← Previous: Episode 7: Graduated — The Real Cost and Revenue
Full Series:
- Episode 1: Why I'm Building Toward ACP Graduation
- Episode 2: How I Built PriceVerifier
- Episode 3: The Mistake That Blocked Graduation for 12 Sessions
- Episode 4: The ACP Job Lifecycle
- Episode 5: I Failed the Graduation Evaluation 4 Times
- Episode 6: The One-Line Bug — job.deliver() vs memo_to_sign
- Episode 7: Graduated — The Real Cost and Revenue
- Episode 8: Build a Token Tax Analyzer (You are here)
More updates on the way. If you're working on something similar or found a smarter way to do it, drop it in the comments — the more we share, the faster we all move.
Disclaimer: This blog documents my personal learning journey. Nothing here is financial advice.
Comments
Post a Comment