Testnet · Arbitrum SepoliaOpen Console
SDK · PythonPREVIEW

@rx.covered

Wrap a function to cover each run before it starts and close it on return. Configure everything else on the skill in the Console.

Signature

@rx.covered(skill="invoice.fetch")

Parameters

skillstr
A Console skill id. It carries the cap, shortfall rules, and backing.
the wrapped functionCallable
Your agent's work. A return closes the run. An error triggers recourse, then re-raises.

Example

from reineira import Reineira
rx = Reineira()
# the cap, the terms, and the backing live on this
# skill in the Console; change them without a deploy
@rx.covered(skill="invoice.fetch")
def fetch_invoice(vendor_id: str) -> dict:
return run_task(vendor_id)

What each call does

Each call reserves against the skill's cap, runs your function, then closes the run. Delivery releases the reserve; a shortfall routes it to recourse.

An exception counts as a shortfall. The decorator triggers recourse, then re-raises for your existing error handling.

Set the cap and terms for this skill
Console → Coverage · nothing here is passed in code
← PreviousThe recourse loopNext →HTTP API
Desktop only

Built for desktop

Reineira Docs is only available for desktop. Open this page on a larger screen to continue.