AN OPEN PROTOCOL FOR AI AGENT CREWS
Give agents a budget, not a hot wallet.
Agents pay APIs per call over the x402 standard. Foliant settles a whole crew's session in one transaction and enforces the crew's budget on-chain, where the code running the agents cannot bypass it. Contracts, an x402 scheme and an SDK, on the chains agents already use.
See the code Talk to usTHE PROBLEM
Agents are becoming economic actors, and every rail treats them like a human with a card.
One transaction per call
An agent making thousands of API calls an hour signs and settles each one. Too slow, too expensive, and it fills the chain with dust.
The budget lives in the code
Nothing bounds what an agent can spend except the software driving it. Give an agent a wallet and you have given it a hot wallet.
Providers carry the risk
An API serving many agents has no way to batch what they owe, verify what they are, or cap what any one of them can run up.
WHAT FOLIANT DOES
The budget, the identity and the settlement live on the crew's accounts, not in its code.
Foliant is a protocol, not a chain: on-chain contracts, an x402 payment scheme and an SDK. First targets are Base and Avalanche; the same contracts run on any EVM chain.
Agent account
An on-chain account operated by a signer key that can live in an attested enclave. The owner rotates or revokes it in one transaction.
Crew budget
Per-transaction and per-window caps, allow and deny lists, expiry, an escalation co-signer, and sub-budgets delegated down a crew that can never exceed their parent. Checked on-chain by the same rule the signer runs, so no code path bypasses it.
Channels and pools
A session of thousands of calls settles in one transaction. A provider serving a whole crew settles all of it in one, with each member bounded by its own budget. Every payer can exit alone.
x402 on the wire
Same headers, same 402 body. Any x402 client or middleware works unchanged; Foliant is a payment scheme to add, not a new stack to adopt.
HOW IT WORKS
Four steps touch no chain. The fifth settles a whole session.
Agent calls the API
Plain HTTP request.
API answers 402
Price, asset and channel or pool terms, in x402 format.
Agent signs an update
Inside the enclave, within policy. Refused if over budget.
API verifies and serves
Signature and balance checked locally; no chain round trip.
API settles in batch
Latest update on-chain, whenever it chooses. One transaction.
Steps 1 to 4 complete inside the latency of the API call. Step 5 amortises one on-chain fee across thousands of calls, so the per-call cost is far below a cent.
IT RUNS TODAY
A reference implementation with tests proves the design before the contracts ship.
API calls to on-chain transactions for one agent session
Calls from three agents settled by one pool transaction
Over-budget payments signed: the enclave and the ledger agree exactly
Tests, including property-based invariants over hundreds of random sessions
Open source under Apache-2.0. pip install -r requirements.txt then python demo/run_demo.py runs all four scenarios in about a second. The whitepaper sets out the full network; the study covers feasibility and costs. Section 11a of the whitepaper records the prior art, including Tempo and the x402 batch-settlement scheme, and what Foliant adds to them.
DESIGN PARTNERS
We're looking for one agent framework or API to pilot the contracts on a testnet you already use.
No cost, no exclusivity, fees waived for the first year of mainnet, and a joint announcement when the integration is live. If you run an x402 endpoint or build agents that pay for tools, get in touch.