SlothPay: the sloth that pays for you - fail-closed agent payments with a local Gemma 3
This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady What I Built SlothPay — the sloth that pays for you. Machine-payable HTTP (the x402 flow, where a server answers 402 with a price and your software just... pays) is powerful and slightly terrifying: your software can spend money while you are not looking. The usual answers are a cloud dashboard, a closed…
SlothPay is an AI-powered solution that simplifies and automates payments for machine-accessible resources. The project, named after the slow and steady sloth, allows users to define policies for resource spending without needing to constantly monitor or intervene. SlothPay uses the HTTP x402 flow, where servers respond with a 402 status code to indicate payment is required, allowing software to handle payments automatically.
The project's key features include:
1. Fail-closed verification of payment credentials: SlothPay checks the seller's signed payment credential for correctness, fixed-scale amounts, 128-bit entropy, and validity windows, denying any transaction that fails these checks.
2. Lazy policy enforcement: Users can set ceilings, nightly budgets, and allow/deny lists to control spending, with the system automatically denying any request that exceeds these limits.
3. Local Gemma 3 LLM: After processing transactions, SlothPay generates a concise report written by Gemma 3, a lightweight 1B parameter LLM running locally on the user's CPU. This report summarizes the transactions and any issues encountered.
SlothPay is designed to be open-source and modular, allowing users to customize components like the verifier, policy engine, and language model. By running these components locally, users maintain full control over their spending data and avoid potential issues with centralized trust providers. The project is available on GitHub (https://github.com/eddyflores100-lang/slothpay) and can be explored further at https://utalabs.tech.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.
This story
This is one outlet's version. Read the fullest account.