Recipes
Working examples. Each recipe is a small, self-contained agent you can copy and adapt.
| Recipe | What it shows |
|---|---|
| Subscription payer | An agent that pays a fixed monthly subscription on the first of each month. |
| Trading copilot | An agent that executes trades on a single whitelisted DEX, capped by weekly spend. |
| Service payer | An agent that pays per-call API fees to a single recipient. |
Each recipe sits in examples/ in the monorepo.
Pattern
Every recipe follows the same shape:
- Read environment (
AGENSAI_API_KEY,AGENSAI_OWNER_PRIVATE_KEY). getAgent(ens)if the agent already exists, elsecreateAgent({ ... }).- Loop or schedule the recurring action.
- Each call goes through
agent.execute({ ... }).
The agent's policy bundle does the safety work. Your recipe code is just business logic.