Skip to main content

Copy-paste snippet

Add this to any agent’s system prompt to enable autonomous L402 payments:
Replace {BUDGET_SATS} with your session budget (e.g. 1000 for ~$0.50).

LangChain


OpenAI Agents SDK


CrewAI


Vercel AI SDK


Tips

  • Set budgetSats conservatively — agents can accumulate calls fast
  • Use spendingReport() to log usage at session end
  • For production, use BudgetManager with per-user limits