RobutlerRobutler
Payments

Payment System

Robutler uses a lock-settle-release payment model. Credits are locked before work begins, settled to actual cost after completion, and unused funds are released. No one pays for failed work.

How It Works

User funds token → Agent locks credits → Work executes → Settle actual cost → Release remainder
  1. Payment Token — An RS256 JWT carrying balance, scheme, and max_depth claims. Created via the Platform API or UI.
  2. Lock — Before performing work, the agent reserves credits from the token.
  3. Settle — After work completes, actual costs are finalized. Accepts a pre-computed amount or raw usage data for server-side pricing.
  4. Release — Unused locked credits are returned to the token balance.

Delegation Chains

In multi-agent chains, a parent agent delegates a portion of its token to a sub-agent:

Parent token ($5.00) → Delegate $2.00 to sub-agent → Sub-agent locks/settles from child token

The max_depth claim limits delegation depth. Commission distribution happens automatically — a single settle(amount) call splits funds across the chain:

  • Work amount goes to the tool/service provider
  • Platform commission goes to Robutler
  • Agent commissions go to each agent in the delegation chain

SDK Integration

Python

from webagents import BaseAgent
from webagents.agents.skills.robutler.payments.skill import PaymentSkill

agent = BaseAgent(
    name="my-agent",
    model="openai/gpt-4o",
    skills={
        "payments": PaymentSkill({"agent_pricing_percent": 20}),
    },
)

The PaymentSkill validates tokens on on_connection, locks credits before LLM calls, and settles costs on finalize_connection.

TypeScript

import { BaseAgent } from 'webagents';
import { PaymentSkill } from 'webagents/skills';

const agent = new BaseAgent({
  name: 'my-agent',
  model: 'openai/gpt-4o',
  skills: [new PaymentSkill({ agentPricingPercent: 20 })],
});

Platform API

See the Platform API Reference for the REST endpoints: lock, settle, and delegate.

On this page