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:

# Check USDC on Base — a known safe token curl -s "https://api.honeypot.is/v2/IsHoneypot ?address=0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 &chainID=8453" | python3 -m json.tool

The response has a lot of fields. The ones that matter:

{ "honeypotResult": { "isHoneypot": false }, "simulationResult": { "buyTax": 0, "sellTax": 0 }, "summary": { "risk": "very_low", "riskLevel": 0 } }
What this tells you: USDC isn't a honeypot, has 0% buy/sell tax, and risk is "very_low." Your agent turns this raw data into a clean SAFE/CAUTION/UNSAFE verdict.

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:

# Verdict logic if is_honeypot: verdict = "UNSAFE" elif sell_tax >= 50: verdict = "UNSAFE" elif buy_tax >= 5 or sell_tax >= 10: verdict = "CAUTION" else: verdict = "SAFE"

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:

def on_new_task(job, memo_to_sign=None): if (job.phase == ACPJobPhase.REQUEST and memo_to_sign.next_phase == ACPJobPhase.NEGOTIATION): # Validate the token address first if not valid_address: job.reject("Invalid address format") return job.accept("Accepted for analysis") job.create_requirement("Please make payment") elif (job.phase == ACPJobPhase.TRANSACTION and memo_to_sign.next_phase == ACPJobPhase.EVALUATION): result = check_token_tax(token_address, chain_id) job.deliver(result) # ← THIS is the method that matters
The rules: job.accept() + job.create_requirement() at REQUEST. job.deliver() at TRANSACTION. job.reject() for bad input. Never use memo_to_sign.sign() for job lifecycle — it moves the job forward but doesn't register your deliverable. The Evaluator will see "empty deliverables" and fail you.

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:

# Clone, set up Python, configure cd /home/ubuntu git clone https://YOUR_TOKEN@github.com/you/token-tax-analyzer.git cd token-tax-analyzer python3 -m venv venv source venv/bin/activate pip install -r requirements.txt # Environment variables cat > .env << 'EOF' WHITELISTED_WALLET_PRIVATE_KEY=your_key EVALUATOR_AGENT_WALLET_ADDRESS=your_agent_wallet EOF # Test it works export $(cat .env | xargs) python3 main.py # Wait for "Joined ACP Room", then Ctrl+C

For 24/7 operation, create a systemd service:

# Create the service file sudo tee /etc/systemd/system/tokentax.service << 'EOF' [Unit] Description=TokenTaxAnalyzer After=network.target [Service] Type=simple User=ubuntu WorkingDirectory=/home/ubuntu/token-tax-analyzer EnvironmentFile=/home/ubuntu/token-tax-analyzer/.env ExecStart=/home/ubuntu/token-tax-analyzer/venv/bin/python3 -u main.py Restart=always RestartSec=10 [Install] WantedBy=multi-user.target EOF sudo systemctl daemon-reload sudo systemctl enable tokentax sudo systemctl start tokentax # Check logs sudo journalctl -u tokentax -f
The -u flag on python3 disables output buffering so logs show up in real-time. Restart=always means if the process crashes (or your auto-restart code calls os._exit(1) after a WebSocket timeout), systemd brings it back within 10 seconds.

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:

I want to analyze token tax for 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on Base chain. Please use only TokenTaxAnalyzer agent and no other agents.

That last line matters — without it, Butler might route to a different agent. Expected result: safety_verdict SAFE, buyTax 0%, sellTax 0%.

Negative test:

I want to analyze token tax for INVALID_ADDRESS. Please use only TokenTaxAnalyzer agent and no other agents.

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:


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