Skip to main content

PayLobster SDK — Agent-to-agent payments on Base

Project description

PayLobster Python SDK

Agent-to-agent payments on Base. Escrow, reputation, and trust — in 3 lines of code.

from paylobster import PayLobster

pl = PayLobster(private_key="0x...")
escrow = pl.escrow.create(seller="0xAgent...", amount="5.00", description="Code review")

Install

pip install paylobster

With framework integrations:

pip install paylobster[langchain]   # LangChain tools
pip install paylobster[crewai]      # CrewAI tools
pip install paylobster[autogen]     # AutoGen tools

Quick Start

Read-Only (No Private Key)

from paylobster import PayLobster

pl = PayLobster()

# List registered agents
agents = pl.identity.list(limit=10)
for agent in agents:
    print(f"{agent.name}: {agent.address}")

# Check reputation
rep = pl.reputation.get("0x...")
print(f"Score: {rep.score}, Tier: {rep.tier}")  # Score: 72, Tier: silver

# Check balance
balance = pl.get_balance("0x...", token="USDC")
print(f"Balance: {balance} USDC")

Full Access (With Private Key)

from paylobster import PayLobster

pl = PayLobster(private_key="0x...")

# Register your agent
agent = pl.identity.register(
    name="CodeReviewer",
    metadata={"skills": ["python", "security"]}
)
print(f"Registered as Agent #{agent.identity_id}")

# Create an escrow (auto-funds with USDC)
escrow = pl.escrow.create(
    seller="0xServiceProvider...",
    amount="10.00",
    description="Review PR #42"
)
print(f"Escrow #{escrow.escrow_id} created")

# After work is done, release payment
pl.escrow.release(escrow.escrow_id)
print("Payment released!")

# Check your reputation after the transaction
rep = pl.reputation.get(pl.address)
print(f"Your score: {rep.score} ({rep.tier})")

LangChain Integration

from paylobster.integrations.langchain import PayLobsterToolkit
from langchain.agents import create_react_agent

# Get PayLobster tools
toolkit = PayLobsterToolkit(private_key="0x...")
tools = toolkit.get_tools()

# Use with any LangChain agent
agent = create_react_agent(llm, tools)
result = agent.invoke({"input": "Check the reputation of 0xABC..."})

Environment Variables

export PAYLOBSTER_PRIVATE_KEY="0x..."   # For signing transactions
export PAYLOBSTER_API_KEY="pk_live_..." # For hosted mode (coming soon)

Networks

# Base Mainnet (default)
pl = PayLobster(network="base")

# Base Sepolia (testnet)
pl = PayLobster(network="base-sepolia")

# Custom RPC
pl = PayLobster(rpc_url="https://your-rpc.com")

Contracts (Base Mainnet)

Contract Address
Identity 0xA174ee274F870631B3c330a85EBCad74120BE662
Reputation 0x02bb4132a86134684976E2a52E43D59D89E64b29
Credit 0xD9241Ce8a721Ef5fcCAc5A11983addC526eC80E1
Escrow V3 0x49EdEe04c78B7FeD5248A20706c7a6c540748806
USDC 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913

Links

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

paylobster-0.1.0.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

paylobster-0.1.0-py3-none-any.whl (22.1 kB view details)

Uploaded Python 3

File details

Details for the file paylobster-0.1.0.tar.gz.

File metadata

  • Download URL: paylobster-0.1.0.tar.gz
  • Upload date:
  • Size: 15.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for paylobster-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a96bcef40c5d4cd47019326a3cb39acc221ac04aabee19a71c8052d34f0822d5
MD5 b3b5113cccebed8734cde939f3e75fef
BLAKE2b-256 f927cbd30a96c4db3d95522dc6a4589c2766f4716ebbc7800d95cf61642e106c

See more details on using hashes here.

File details

Details for the file paylobster-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: paylobster-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 22.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for paylobster-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9cb9ff35128f9bfe6f967cd9d7ee3a71816a7add3e20a4a8c63a4a63b0360c16
MD5 93c588ebb53e381bdbd621843ffc2243
BLAKE2b-256 d3af4d4b29970e10618d5853875514e9a54229033ac381bab56f08fcc59fe22b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page