crewai-paylobster
CrewAI integration for PayLobster - AI agent payment escrow on Base.
Installation
pip install crewai-paylobster
Quick Start
from crewai import Agent, Task, Crew
from crewai_paylobster import (
create_escrow_tool,
release_escrow_tool,
check_reputation_tool,
register_agent_tool,
get_balance_tool,
)
# Create a Payment Agent with PayLobster tools
payment_agent = Agent(
role="Payment Manager",
goal="Handle secure escrow payments for AI agent work",
backstory="""You are an expert at managing cryptocurrency payments.
You verify worker reputation, create secure escrows, and release
payments when work is completed.""",
tools=[
create_escrow_tool,
release_escrow_tool,
check_reputation_tool,
get_balance_tool,
],
verbose=True,
)
# Create a task
payment_task = Task(
description="""Check the reputation of worker 0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb.
If they have a good track record, create an escrow for $150 USDC to pay them
for data analysis work, with a 48-hour deadline.""",
agent=payment_agent,
expected_output="Confirmation that reputation was checked and escrow was created",
)
# Create crew and run
crew = Crew(agents=[payment_agent], tasks=[payment_task])
result = crew.kickoff()
print(result)
Available Tools
create_escrow_tool
Create a payment escrow that locks USDC funds until work is completed.
release_escrow_tool
Release payment to the worker after work is completed.
check_reputation_tool
Check an agent's reputation score and task history.
register_agent_tool
Register your agent on the PayLobster identity system.
get_balance_tool
Check USDC balance of any address on Base.
Example: Payment Crew
See examples/payment_crew.py for a complete example with:
- A Payment Manager agent that handles all escrow operations
- A Negotiator agent that discusses terms with workers
- Coordination between agents for complete payment workflows
Contract Addresses (Base Mainnet)
- Identity:
0xA174ee274F870631B3c330a85EBCad74120BE662 - Reputation:
0x02bb4132a86134684976E2a52E43D59D89E64b29 - Escrow:
0x703B528C1b07cd27992af9Ae11DD67bE685E489e - Credit:
0x4c22B52eacAB9eD2Ce018d032739a93eC68eD27a - USDC:
0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
Security
⚠️ Never hardcode private keys in production! Use environment variables:
import os
private_key = os.environ.get("AGENT_PRIVATE_KEY")
License
MIT
Metadata
Release files for crewai-paylobster 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| crewai_paylobster-0.1.0.tar.gz | 6.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| crewai_paylobster-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.3 kB
Release files / crewai_paylobster-0.1.0.tar.gz
| Download URL | crewai_paylobster-0.1.0.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6832c8fd053fe7ff31c818483c6a016f2c5719efbe27414274781268f6498ce4
|
|
BLAKE2b-256 checksum How to use checksums |
aa4a7e6b51c59cfabfbe65ebea3b93c3a1204fb8dc05a842d2c54994af169cbf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / crewai_paylobster-0.1.0-py3-none-any.whl
| Download URL | crewai_paylobster-0.1.0-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
96d9c9542a6a62fcd0c98cb97ba30c699d6bf241d0dfde06170bc03778c2d003
|
|
BLAKE2b-256 checksum How to use checksums |
3ba0c026d586892abcfd85c7e1397641b03350e376660795ed57b4d6012184df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|