paylobster 0.1.0
PayLobster SDK — Agent-to-agent payments on Base
Requires Python: >=3.9
Keywords: agents, ai, base, blockchain, escrow, payments, reputation, x402

# PayLobster Python SDK

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

```python
from paylobster import PayLobster

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

## Install

```bash
pip install paylobster
```

With framework integrations:

```bash
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)

```python
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)

```python
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

```python
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

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

## Networks

```python
# 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

- **Website:** https://paylobster.com
- **Docs:** https://paylobster.com/docs
- **npm SDK:** `npm install pay-lobster`
- **CLI:** `npm install -g @paylobster/cli`
- **MCP Server:** https://paylobster.com/mcp/mcp
- **GitHub:** https://github.com/itsGustav/PayLobster

## License

MIT