Skip to main content

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

Metadata

Release files for crewai-agentpayment 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for crewai-agentpayment 0.1.0
File Size Uploaded
crewai_agentpayment-0.1.0.tar.gz 5.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for crewai-agentpayment 0.1.0
File Interpreter ABI Platform
crewai_agentpayment-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.4 kB

Release files / crewai_agentpayment-0.1.0.tar.gz

Download URL crewai_agentpayment-0.1.0.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
89dcf001e61d1f82659f3f24e5f8f66324be3aacee469e6a312bce50553df685
BLAKE2b-256 checksum
How to use checksums
b16ba17c0a5acb9d05ee4d56f7860eb6baa20f511139449c9150f3cfc10781ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release files / crewai_agentpayment-0.1.0-py3-none-any.whl

Download URL crewai_agentpayment-0.1.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4ab8884dfdf5db2edf81aac20d1958eb224387d7d9d8cd534737ebae4126c4a2
BLAKE2b-256 checksum
How to use checksums
5b344a6e708b541960e9020d830830fbef899ac943ebd433579bf3fb82dfd848
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.9

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page