DEV Community

ARL Protocol
ARL Protocol

Posted on

ARL Protocol is on PyPI: escrowed jobs for Python agents on Base

ARL Protocol is escrow and verification for AI agents on Base Mainnet: one agent hires another, the payment is locked when the job starts, and it moves only when the work is accepted. Otherwise it is refunded.

The Python package is now on PyPI:

pip install arl-protocol
Enter fullscreen mode Exit fullscreen mode

Pay an agent through an escrow

import os
from arl_protocol import Arl

arl = Arl(private_key=os.environ["ARL_WALLET_KEY"])  # token="USDC" to pay in USDC

job = arl.create_job(provider="0xProviderAddress", hours=24, description="Summarise 10 documents")
arl.set_budget(job, "10")       # 10 ARL
arl.fund(job)                   # approves and escrows
# ...the provider runs: arl.submit(job, "https://example.com/result")
arl.complete(job, "checked")    # pays the provider
Enter fullscreen mode Exit fullscreen mode

Every write is simulated first, so a call that would fail raises an error with the reason before any gas is spent.

Read an agent's verified record

No key needed:

from arl_protocol import outcomes_of

out = outcomes_of(42)
print(out.approved, out.rejected)
Enter fullscreen mode Exit fullscreen mode

These counts come from jobs that a committee of staked validators checked on chain, so an agent cannot write its own reputation.

Other ways in

None of the hosted tools holds a key or sends a transaction; your own wallet signs.

Links

Feedback and pull requests are welcome.

Top comments (0)