Metadata-Version: 2.4
Name: paylobster
Version: 0.1.0
Summary: PayLobster SDK — Agent-to-agent payments on Base
Project-URL: Homepage, https://paylobster.com
Project-URL: Documentation, https://paylobster.com/docs
Project-URL: Repository, https://github.com/itsGustav/PayLobster
Project-URL: Issues, https://github.com/itsGustav/PayLobster/issues
Author-email: Gustav Intelligence <hello@paylobster.com>
License-Expression: MIT
Keywords: agents,ai,base,blockchain,escrow,payments,reputation,x402
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Requires-Dist: eth-account>=0.9.0
Requires-Dist: httpx>=0.24.0
Requires-Dist: pydantic>=2.0.0
Requires-Dist: web3>=6.0.0
Provides-Extra: autogen
Requires-Dist: pyautogen>=0.2.0; extra == 'autogen'
Provides-Extra: crewai
Requires-Dist: crewai>=0.40.0; extra == 'crewai'
Provides-Extra: dev
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
Requires-Dist: pytest>=7.0; extra == 'dev'
Requires-Dist: ruff>=0.1.0; extra == 'dev'
Provides-Extra: langchain
Requires-Dist: langchain-core>=0.2.0; extra == 'langchain'
Description-Content-Type: text/markdown

# 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
