Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

crewai_agentpayment-0.1.0.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

crewai_agentpayment-0.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

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

Hashes for crewai_agentpayment-0.1.0.tar.gz
Algorithm Hash digest
SHA256 89dcf001e61d1f82659f3f24e5f8f66324be3aacee469e6a312bce50553df685
MD5 e4a480de29f371c24d81861e57c4468b
BLAKE2b-256 b16ba17c0a5acb9d05ee4d56f7860eb6baa20f511139449c9150f3cfc10781ab

See more details on using hashes here.

File details

Details for the file crewai_agentpayment-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for crewai_agentpayment-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4ab8884dfdf5db2edf81aac20d1958eb224387d7d9d8cd534737ebae4126c4a2
MD5 a40389ce96f94078c340d653845dd80f
BLAKE2b-256 5b344a6e708b541960e9020d830830fbef899ac943ebd433579bf3fb82dfd848

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page