testnet
GitHub

Gas Source Modes

mechanism agents

Three distinct modes determining who pays the OKRW gas fees for an agent's transactions.

MAWS agents operate as Account Abstraction (AA) wallets, meaning their gas fees can be sponsored or delegated. The gasSource configuration dictates whether the WaaS Paymaster, the agent itself, or the human owner covers the execution costs.

PAYMASTER Mode

The default mode. The Maroo WaaS Paymaster sponsors the transaction. The agent's OKRW balance is untouched by gas fees, making it ideal for onboarding and low-value autonomous operations.
await agent.set_gas_source({ agentId: "...", gasSource: "PAYMASTER" });

SELF Mode

The agent pays for its own gas from its OKRW balance. If the agent's balance drops below the required gas cost, transactions will fail with INSUFFICIENT_BALANCE. This mode is used for fully self-sovereign agents.

OWNER Mode

The human owner's wallet pays the gas fees for the agent. This requires specifying a gasSourceAddress. It allows an owner to fund a fleet of agents from a single central treasury without distributing OKRW to each agent individually.
Source: maroo-agents
ESC
Type to search