Your first automation
Refund contributors when a raise fails, end to end against a dev environment.
Arete documentation
For the complete documentation index optimized for AI agents, see llms.txt or llms-full.txt. A markdown version of this page is available by appending.mdto the URL or sendingAccept: text/markdown.
For AI agents: the documentation index is at llms.txt (full corpus: llms-full.txt). A markdown source for this page is /automations/overview.md.
Some protocol steps can only be signed by the user: a deposit from their
wallet, a refund to it, a claim, a move between positions they own. Without
help, those steps wait until the user opens your app. @usearete/automations
lets your backend run them for the user when something happens, inside limits
the user agreed to, with a key the user delegated to you. Arete never holds
that key.
That opens up products a protocol cannot offer on its own:
Delegated signing (your backend signs for the user) is powerful, and the most can go wrong with it. Reach for something simpler first:
| Situation | Use |
|---|---|
| Anyone may advance the step | A keeper step in the protocol |
| The money is committed now | A deposit straight into the pot or escrow |
| A fixed recurring payment from a wallet the user keeps using | An on-chain allowance (a subscription program, SPL approve, a Squads spending limit) |
| The user must sign each time, the action is more than a fixed transfer, and the wallet holds their funds | Automations |
Delegated signing through an embedded wallet only makes sense when that wallet is where the user’s money already lives. If users must fund a wallet just so you can automate it, they have already committed the money, and a direct deposit is simpler.
Automations is a TypeScript library that runs in your backend, next to your own database:
Steps for one wallet run one at a time. Every trigger and step is recorded in your database, so retries, duplicate webhooks and restarts never run a step twice.
Your first automation
Refund contributors when a raise fails, end to end against a dev environment.
Triggers and fan-out
Webhooks, streams, schedules and live views, and turning one trigger into a step per user.
Consent and limits
What users sign, how limits and spending windows work, and how to design the opt-in screen.
Signers and safety
The signing policy, Privy, and what protects users if your backend is compromised.