Skip to main content

crewai-true402

PyPI version   Stable · production-ready — semver-stable public API (v1.0).

true402 tools for CrewAI — give a Base trading agent a pre-trade rug/honeypot check it pays for per call over x402 (USDC on Base). No accounts, no API keys — the wallet is the identity. The safety checks have a free daily trial, so the tools work out of the box with no wallet configured.

Install

pip install crewai-true402

Use

from crewai import Agent
from crewai_true402 import true402_tools

# Reads PAYER_PRIVATE_KEY from the env (a Base wallet holding a little USDC).
# Omit the key to rely on the free daily trial for the safety stalls.
tools = true402_tools()

trader = Agent(
    role="Base memecoin trader",
    goal="Only buy tokens that pass an on-chain safety check",
    tools=tools,
    backstory="You never ape into a token before rug-checking it.",
)

The agent gets four tools:

Tool What Price
true402_token_report Composite avoid/caution/ok verdict — honeypot buy/sell simulation + liquidity + ownership + recent rug activity. Call before buying. ~$0.01
true402_token_safety Structural safety score 0–100 + flags (honeypot sim, liquidity, mint/ownership). ~$0.005
true402_address_safety Profile + risk for any address before you send/approve/call it (EOA vs contract, balances, proxy detection). ~$0.005
true402_deployer_check Deployer wallet reputation — age, contracts shipped, fresh-throwaway flag — to catch serial ruggers. ~$0.008

Configuration

true402_tools() reads the environment, or pass a PayOpts:

from crewai_true402 import true402_tools, PayOpts

tools = true402_tools(PayOpts(
    payer_private_key="0x…",   # a Base wallet with a little USDC (gas is sponsored; USDC only)
    max_amount_usd=0.10,        # hard per-call ceiling — refuses to sign a 402 demanding more
))
Env var Default Meaning
PAYER_PRIVATE_KEY Base wallet key that signs x402 payments (needs USDC, not ETH). Unset → free trial only.
TRUE402_BASE_URL https://true402.dev/api Override to point at a self-hosted instance.
BASE_RPC_URL https://mainnet.base.org Base RPC for the balance pre-check.

Safety

The client refuses to sign anything that isn't USDC-on-Base within max_amount_usd (default $0.10) — so a rogue or compromised endpoint can't make your agent authorize an unexpected asset, network, or amount. The private key is used only to sign locally; it never leaves the process.

Links

License

MIT

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crewai_true402-1.0.0.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crewai_true402-1.0.0-py3-none-any.whl (8.4 kB view details)

Uploaded Python 3

File details

Details for the file crewai_true402-1.0.0.tar.gz.

File metadata

  • Download URL: crewai_true402-1.0.0.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for crewai_true402-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8166bcd21b6cc74dd0f2c298ce17f2d08aa6f054b8c6543adfd50c33dc7b7247
MD5 214be81fb45ac52634f87107279d13e7
BLAKE2b-256 5caa6fb67271043995c6d6e5bc058a7efeb368aa0cb02e0daf599e0f5b573bcb

See more details on using hashes here.

File details

Details for the file crewai_true402-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: crewai_true402-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 8.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for crewai_true402-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d8ac2957c1eff74b75bda1a35b0f90c29664a245d3c01ac608cbc4295d694954
MD5 4ca6dcbe46d8cb5cab29921d02b97414
BLAKE2b-256 e9ce8aaded907c8a3a6bb492676742cf534600dfde583e639178d118f722b1cd

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page