YOUR USER READSOn the 5th, a licensed partner converts 80 USDC and pays it into the biller’s bank account, with a reference.
01HOW IT WORKS: Sign once. It runs.
Where Anafi sits in your stack. Your app builds a rule, your user signs one transaction, and the engine pays each time the condition is met.
Your side
Your appA form, a sign step, an activity view.Holds no key and no funds.
User's walletHolds the key and the funds.Signs once. Revokes with one transaction.
Anafi
SDK and APIBuilds and sends the rule.Returns the activity.
Anafi engineRuns in an Intel TDX enclave.Checks each rule. Signs each payment.One key, sealed inside.
Chain and bank
PayeeReceives a transfer.Integrates nothing.
On chainOnly the rule's hash.One nonce per payment.Pays only on a valid engine signature.
Licensed partnerConverts and pays a bank account,with a reference.
01 · Your app → SDK and API
rule file
02 · SDK and API → Anafi engine
rule, encrypted
03 · Anafi engine → Your app
approved hash
04 · Your app → User's wallet
sign step
05 · User's wallet → On chain
one transaction: the rule's hash
06 · Anafi engine → On chain
signed payment
07 · On chain → Payee
transfer
08 · On chain → Licensed partner
or a bank payout
09 · SDK and API → Your app
activity
Once, at set-upEach time the condition is met
02BUILD WITH AI: Tell your agent what you want.
Pick what your users should do. Copy the prompt, or open it in your assistant. It designs the screens and writes the rules.
MY USERS CAN
YOUR PROMPT
I am adding stablecoin automations to my app with Anafi (https://ana.fi/developers/). Help me design the screens and write the rules.
What my users should be able to do:
- Send money to other users of my app
- Pay out to a bank account
- Save a share of each incoming payment into a pot
- Set aside a share of each incoming payment for tax
How Anafi works:
- My app builds a rule from a form. The user reads the rule as one sentence and signs one transaction in their own wallet.
- The Anafi engine then runs the rule. It pays each time the condition is met, only inside the limits the user signed.
- My app never holds keys or funds. The user can revoke with one transaction.
The rule language is YAML:
- trigger types: calendar (day_of_month or day_of_week as lists, with time_of_day and an optional timezone), periodic (interval_seconds), at_fixed_time (timestamps), incoming_tx and outgoing_tx (value as an amount or a range such as "100.. USDC", plus from, to or account), price_crossed (token, direction, price_usd, hold_seconds, cooldown_seconds)
- action types: send_one (to, value), send_batch (recipients, each with to and value), exchange (in, out), off_ramp (to with an iban, value, memo), notify (channel, message)
- limits: token_allowlist, recipient_allowlist and iban_allowlist under global, and start and expiry on a rule, as full timestamps
- A value is an amount and a token ("80 USDC") or a share of what arrived ("trigger.value * 10%"). A name that starts with $ is a value my app fills in.
- The full specification, with worked examples, is public: https://api.polygon.ana.fi/api/dsl/docs. Read it first if you can open links, and follow it.
Example rule:
rules:
pay_bill:
trigger: { type: calendar, day_of_month: [5], time_of_day: "09:00" }
actions:
- { type: send_one, to: "$utility", value: "80 USDC" }
expiry: "2027-12-31T23:59:59Z"
For each feature, give me:
1. The screen: its form fields, the one-sentence summary the user reads before signing, and the empty, loading and error states.
2. The rule template in YAML, with $ placeholders for the values the form fills in.
3. The activity view, with a revoke button.
Then list where my code calls Anafi: build the rule, send it for approval, ask the user to sign, read the activity, revoke. Mark each call as a TODO. Do not invent SDK or API names: I will add them from Anafi's reference.
Before you start, ask me what you need to know about my app.
OPEN IN
Prompt copied. Paste it if the chat opens empty.
The portal gives your agent a starter prompt and the rule language specification. Start in sandbox
WHAT YOUR AGENT BUILDS
1 / 10
Send to a friend
THE FORM
To
Another user
Amount
20 USDC
Repeat
Every Friday
YOUR USER READS
Every Friday at 09:00, send 20 USDC to another user.
04NON-CUSTODIAL INTEGRATION: What you build. What you skip.
YOUR SIDE
You build
A form that fills in a rule.
A sign step in the user's own wallet.
An activity view, with a revoke button.
THE SIGNED RULE
ANAFI'S SIDE
The engine runs
The scheduler.
Retries.
Bank payouts, through licensed partners.
Proof that nothing was skipped.
BUILD WITH
The SDK, the API and the rule language.
RAILS
Your off-ramp and virtual accounts, or ours.
HOSTING
Our engine, co-hosted, or yours.
05FROM TEST TO LIVE: Sandbox. Playground. Live.
01SANDBOX
A project in the portal, with test funds and sample data.
02PLAYGROUND
Walk the flow your user sees, and read the rule it makes.
03LIVE
Your users sign in their own wallets, and the engine runs.
06FAILURE MODES: When something goes wrong.
Four parties, and only one of them can sign a payment. It signs what the rule allows, and nothing else.
IF
Anafi goes offline
Nothing fires, and the funds stay in the user’s wallet. Missed payments run once, late, when the engine is back.
IF
Your app is breached
Your app holds no key. A payment needs the engine’s signature, and the engine signs only what the user’s rule allows.
IF
Anafi is asked for data
We can only hand over what we hold: wallet addresses and execution logs. Rules are encrypted. KYC stays with the licensed partner.
IF
A rule is wrong
The engine checks each rule before the user signs it: syntax, amounts, payees. A rule it has not approved cannot be committed.
IF
The user wants out
One transaction from the user’s own wallet revokes the mandate. Nobody’s permission is needed, and it takes effect once confirmed.
IF
The balance is short
The payment is retried once, then it reverts. Nothing moves.
07VERIFY: Don't trust it. Check it.
Four things you can verify yourself, without asking us, and who has reviewed the code.
01
Attested engine
proves which code holds the key
The engine runs in an Intel TDX enclave. Its attestation is published on chain and bound to an exact, reproducible build, and our verifier checks it with only an RPC node. The Anafi team cannot read inside the enclave or use its key.
02
Rule hash
proves what the user signed
A rule is encrypted on the user’s device. On chain there is only its hash, and every payment can be checked against it. The rule itself stays private.
03
Signed heartbeat
proves nothing was skipped
Every 30 minutes the engine signs a heartbeat that records the block it has processed to. The attested code reads every block in order, so a valid heartbeat shows every rule was evaluated up to that block. If it stops, anyone can see it.
04
One nonce per payment
proves nothing ran twice
Each payment carries a unique on-chain nonce and an expiry. The wallet refuses a second execution, even after a retry, a restart or a reorg, and a late signature is worth nothing.
How do I add recurring stablecoin payments to my app?
With Anafi you build three things: a form that fills in a rule, a sign step in the user's own wallet, and an activity view with a revoke button. The Anafi engine runs the scheduler, retries and bank payouts. See autopay.
What can developers use on Anafi today?
Sandbox projects and playgrounds are open today in the Anafi portal: create a project and build your first rule. Going live with your own users is in beta testing: talk to us to take part. The rule language specification and your project's API keys are in the portal too.
Is Anafi non-custodial?
Yes. An app built on Anafi holds no keys and no funds. Users sign in their own wallets, and funds stay there until a rule moves them. The engine acts only inside the limits a user signed. See Trust & Security.
What is an Anafi rule?
An Anafi rule is a short YAML file: what fires it, what it does, and its limits. Your app builds it from a form, through the SDK or the API, and the user reads it as one sentence before signing.
Which wallets and chains does Anafi support?
Anafi is technology agnostic: it supports Safe, Swig, MPC wallets, ERC-4337, EIP-7702, ERC-20 approval and Permit2 on EVM chains and Solana. It is live on Ethereum, Polygon and X Layer, with Solana on devnet.
Can we use our own off-ramp or banking partner?
Yes. A rule can pay out to a bank account through your own off-ramp and virtual accounts, or through Anafi's, with licensed partners. See on/off-ramp.
Can we self-host the Anafi engine?
Yes. The Anafi engine runs three ways: hosted by Anafi, co-hosted, or hosted by you.
Can a coding agent build the integration?
Yes. The Anafi portal gives you a prompt to paste into your coding agent, together with the rule language specification.
What does it cost to build on Anafi?
Anafi Mandates and Anafi Treasury are priced by quote. See what Anafi costs.
GET STARTED
Build your first rule in the sandbox.
Bring your engineer. We walk through the rule language and the integration.
We use Google Analytics and PostHog to understand how people use this site. If you accept, they use cookies. If you decline, they count visits without cookies. See our Privacy Policy.