CrewAI tools for AgentPayment Network — autonomous agent-to-agent payments
Project description
crewai-agentpayment
CrewAI tools for AgentPayment Network — autonomous agent-to-agent payments across crypto, card, and ACH.
Installation
pip install crewai-agentpayment
Quick Start
from crewai import Agent, Task, Crew
from crewai_agentpayment import get_agentpayment_tools
# Get all payment tools
tools = get_agentpayment_tools(api_key="apn_your_key_here")
# Create a payment-enabled agent
payment_agent = Agent(
role="Payment Agent",
goal="Handle autonomous payments between AI agents",
backstory="You process payments on behalf of AI agents autonomously.",
tools=tools,
verbose=True
)
# Create tasks
bill_task = Task(
description="Create an invoice for agent_consumer_123 for $5 for API usage via crypto",
agent=payment_agent,
expected_output="Invoice created and paid confirmation"
)
# Run crew
crew = Crew(agents=[payment_agent], tasks=[bill_task], verbose=True)
result = crew.kickoff()
print(result)
Available Tools
| Tool | Description |
|---|---|
create_invoice |
Bill a consumer agent for services rendered |
approve_invoice |
Manually approve and pay a pending invoice |
set_billing_rule |
Auto-approve invoices from a provider |
check_invoice_status |
Check status of an invoice |
list_invoices |
List sent/received invoices |
create_recurring_billing |
Set up recurring billing (Model A or B) |
set_circuit_breaker |
Set daily spend/transaction limits |
Multi-Agent Example
from crewai import Agent, Task, Crew
from crewai_agentpayment import get_agentpayment_tools
provider_tools = get_agentpayment_tools(api_key="apn_provider_key")
consumer_tools = get_agentpayment_tools(api_key="apn_consumer_key")
provider = Agent(
role="API Provider",
goal="Provide services and collect payment autonomously",
backstory="You provide data APIs and bill consumers per request.",
tools=provider_tools,
verbose=True
)
consumer = Agent(
role="API Consumer",
goal="Use services and pay autonomously",
backstory="You consume data APIs and pay providers automatically.",
tools=consumer_tools,
verbose=True
)
setup_task = Task(
description="Set a billing rule to auto-pay up to $10 from provider_agent_456 via crypto",
agent=consumer,
expected_output="Billing rule confirmed"
)
bill_task = Task(
description="Create an invoice for agent_consumer_123 for $5 for 500 API requests",
agent=provider,
expected_output="Invoice paid confirmation"
)
crew = Crew(
agents=[consumer, provider],
tasks=[setup_task, bill_task],
verbose=True
)
crew.kickoff()
Pricing
Volume-based, dual-sided:
- 0–10k requests/month: 1% consumer + 1% provider
- 10k–20k: 0.9% each side
- 20k+: 0.8% each side
Links
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_agentpayment-0.1.0.tar.gz.
File metadata
- Download URL: crewai_agentpayment-0.1.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
89dcf001e61d1f82659f3f24e5f8f66324be3aacee469e6a312bce50553df685
|
|
| MD5 |
e4a480de29f371c24d81861e57c4468b
|
|
| BLAKE2b-256 |
b16ba17c0a5acb9d05ee4d56f7860eb6baa20f511139449c9150f3cfc10781ab
|
File details
Details for the file crewai_agentpayment-0.1.0-py3-none-any.whl.
File metadata
- Download URL: crewai_agentpayment-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ab8884dfdf5db2edf81aac20d1958eb224387d7d9d8cd534737ebae4126c4a2
|
|
| MD5 |
a40389ce96f94078c340d653845dd80f
|
|
| BLAKE2b-256 |
5b344a6e708b541960e9020d830830fbef899ac943ebd433579bf3fb82dfd848
|