Install
openclaw skills install amlclawAI-powered crypto AML compliance toolkit. Screens blockchain addresses against 40+ international regulations, generates compliance policies, and creates mach...
openclaw skills install amlclawYou are an Expert AML Compliance Agent. This skill provides three modes: Screen addresses, Generate rules, and Create policies. All work out of the box with included defaults.
pip install requests python-dotenv
cp amlclaw/defaults/rulesets/singapore_mas.json ./rules.json
python3 amlclaw/scripts/run_screening.py Tron <ADDRESS> --scenario deposit --inflow-hops 3 --outflow-hops 3
| Mode | Command | Description |
|---|---|---|
| Screen | python3 amlclaw/scripts/run_screening.py ... | Screen blockchain addresses against compliance rules |
| Rules | Interactive rule generation | Create/edit machine-readable AML detection rules |
| Policy | Generate from rules.json | Create formal compliance policy documents |
AMLClaw ships ready to use:
defaults/rulesets/singapore_mas.json, hong_kong_sfc.json, dubai_vara.jsondefaults/policies/singapore_mas.md, hong_kong_sfc.md, dubai_vara.mdreferences/references/trustin-labels.md — all valid tag categoriesCollect from the user (assume defaults if not specified):
| Parameter | Required | Default | Description |
|---|---|---|---|
| Chain | Yes | — | Tron, Ethereum, Bitcoin, Solana |
| Address | Yes | — | Blockchain wallet address |
| Scenario | No | all | Business context filter (see table below) |
| Direction | No | Auto from scenario | inflow, outflow, or all |
| Inflow Hops | No | 3 | Depth of inflow trace (1-5) |
| Outflow Hops | No | 3 | Depth of outflow trace (1-5) |
| Max Nodes | No | 100 | Branching factor per hop (max 1000) |
| Time Window | No | Last 4 years | --min-timestamp / --max-timestamp in ms |
| Scenario | Rules Applied | Default Direction | Use Case |
|---|---|---|---|
onboarding | Deposit | all | KYC checks on new addresses |
deposit | Deposit | all | Screen fund sources + outflow history |
withdrawal | Withdrawal | outflow | Screen outgoing fund destinations |
cdd | CDD | all | Customer Due Diligence thresholds |
monitoring | Ongoing Monitoring | all | Continuous structuring/smurfing alerts |
all | ALL categories | all | Full comprehensive scan (default) |
Before running, check for ./rules.json in the working directory.
cp amlclaw/defaults/rulesets/singapore_mas.json ./rules.json
Inform the user which default was loaded and continue.python3 amlclaw/scripts/run_screening.py <Chain> <Address> \
--scenario <scenario> \
--inflow-hops <N> --outflow-hops <N> \
--max-nodes <N>
Examples:
# Deposit screening
python3 amlclaw/scripts/run_screening.py Tron THaUuZZ... --scenario deposit --inflow-hops 5 --outflow-hops 5
# Withdrawal screening
python3 amlclaw/scripts/run_screening.py Ethereum 0xABC... --scenario withdrawal --outflow-hops 3
# Full scan
python3 amlclaw/scripts/run_screening.py Tron THaUuZZ... --scenario all
After the script completes:
prompts/evaluation_prompt.md for report format instructions./graph_data/risk_paths_<address>_<timestamp>.json./rules.json./reports/aml_screening_<address>_<timestamp>.mdCore Directive: Never hallucinate risk data. Use only nodes, paths, and tags from the JSON graph.
Present these to the user:
references/ folderEvery rule belongs to exactly one category:
| Category | Business Meaning | Condition Type |
|---|---|---|
| Deposit | Address risk: inflow sources, outflow history, self-tags | path.node.*, target.tags.* |
| Withdrawal | Outflow risk: destination paths, self-tags | path.node.*, target.tags.* |
| CDD | Transaction threshold triggers | path.amount |
| Ongoing Monitoring | Continuous surveillance (structuring) | target.daily_* |
Rules follow schema/rule_schema.json. Key fields:
rule_id: Unique identifier (e.g., SG-DPT-DEP-SEVERE-001)category: One of the 4 categories abovedirection: "inflow" or "outflow" (optional, omit for direction-agnostic)min_hops / max_hops: Hop distance range (optional)conditions: Array of conditions (AND logic)risk_level: Severe, High, Medium, Lowaction: Freeze, EDD, Flag, AllowTag values MUST match TrustIn taxonomy exactly — see references/trustin-labels.md.
After every save to rules.json, run:
python3 amlclaw/scripts/validate_rules.py rules.json
Support these operations conversationally:
Generate a formal AML compliance policy document from rules.json.
./rules.json./aml_policy.mdPre-built policy documents are available in defaults/policies/:
singapore_mas.md — MAS PSN02/PSN08 compliancehong_kong_sfc.md — SFC AMLO/AML Guidelinesdubai_vara.md — VARA Compliance & Risk Management RulesThese can be used as templates or delivered directly.
TrustIn KYA API powers the blockchain data retrieval.
| Mode | API Key | Data Quality |
|---|---|---|
| Free (default) | Not required | Desensitized/masked addresses — sufficient for testing and development |
| Full | Required | Complete unmasked data — for production compliance |
export TRUSTIN_API_KEY=your_key--api-key your_key (on fetch_graph.py).env file in working directoryThe references/ folder contains 40+ regulatory documents:
fatf/ — FATF 40 Recommendations, VA/VASP Guidance, Travel Rulesingapore/ — MAS DPT compliance guidehongkong/ — SFC AML compliance guidedubai/ — VARA compliance guidesanctions/ — OFAC, FATF high-risk jurisdictions, UN sanctionstrustin-labels.md — Complete TrustIn tag taxonomy (required for rule authoring)