CrewAI integration for PayLobster - AI agent payment escrow on Base
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crewai_paylobster-0.1.0.tar.gz.
File metadata
- Download URL: crewai_paylobster-0.1.0.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6832c8fd053fe7ff31c818483c6a016f2c5719efbe27414274781268f6498ce4
|
|
| MD5 |
eae52a496f26551754a5b33657470cd5
|
|
| BLAKE2b-256 |
aa4a7e6b51c59cfabfbe65ebea3b93c3a1204fb8dc05a842d2c54994af169cbf
|
File details
Details for the file crewai_paylobster-0.1.0-py3-none-any.whl.
File metadata
- Download URL: crewai_paylobster-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
96d9c9542a6a62fcd0c98cb97ba30c699d6bf241d0dfde06170bc03778c2d003
|
|
| MD5 |
68dc087ab3f6541a4aaac6d3edafe828
|
|
| BLAKE2b-256 |
3ba0c026d586892abcfd85c7e1397641b03350e376660795ed57b4d6012184df
|