CrewAI integration for PQSafe AgentPay — post-quantum safe payments for AI crews
Project description
crewai-pqsafe
Post-quantum safe payments for CrewAI agents, powered by PQSafe AgentPay.
Built on @pqsafe/agent-pay — see github.com/PQSafe/pqsafe
Install
pip install crewai-pqsafe
Quick start — crew with a payment-capable agent
from crewai import Agent, Crew, Task
from crewai_pqsafe import PQSafePaymentTool
payment_tool = PQSafePaymentTool()
finance_agent = Agent(
role="Finance Agent",
goal="Process approved supplier payments",
backstory="You pay invoices that have been pre-authorized via PQSafe envelopes.",
tools=[payment_tool],
)
pay_invoice = Task(
description=(
"Renew Perplexity Pro subscription at perplexity.ai — $20 USD. "
"Use envelope: {envelope_json}"
),
agent=finance_agent,
expected_output="Payment confirmation with txId and rail",
)
crew = Crew(agents=[finance_agent], tasks=[pay_invoice])
result = crew.kickoff(inputs={"envelope_json": "<your signed envelope JSON>"})
print(result)
How it works
- A human wallet owner issues a signed SpendEnvelope — a post-quantum (ML-DSA-65) token constraining agent ID, max amount, allowed recipients, and validity window.
- The CrewAI agent calls
pqsafe_paywith the envelope, recipient, amount, and memo. - PQSafe verifies constraints server-side and routes the payment over the cheapest available rail (Airwallex, Wise, Stripe, USDC/Base, or x402).
- The tool returns
{txId, status, rail}.
Tool parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
envelope_json |
str |
Yes | SignedEnvelope as JSON string |
recipient |
str |
Yes | Recipient address (IBAN, crypto addr, etc.) |
amount |
float |
Yes | Amount in envelope's currency (> 0) |
memo |
str |
No | Human-readable payment reference |
Links
- Documentation: docs.pqsafe.xyz
- Website: pqsafe.xyz
- GitHub: github.com/PQSafe/pqsafe
- npm SDK:
@pqsafe/agent-pay
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
crewai_pqsafe-0.1.0.tar.gz
(4.8 kB
view details)
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_pqsafe-0.1.0.tar.gz.
File metadata
- Download URL: crewai_pqsafe-0.1.0.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
805d5ef71c8c4a7a8348f9f1ea547b570c3cb676691476b7696451edace1ec07
|
|
| MD5 |
37a75924be9b03e3eb8d5bde207f0e2a
|
|
| BLAKE2b-256 |
b8f36c45dce791259ce792272c53534f6fc5ae99f8832d017121ee60eaa1e0e3
|
File details
Details for the file crewai_pqsafe-0.1.0-py3-none-any.whl.
File metadata
- Download URL: crewai_pqsafe-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.5 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 |
f8bf9175ca267108824d8c459ca2cd025e8676a525d47f87c83eccdb2130f040
|
|
| MD5 |
b6b29823a44b6bcb912fb915b6ea8a34
|
|
| BLAKE2b-256 |
a61fb1bc8f44fc31fd2f78dbea825265e7906d763b008bce8f5df3366422dde3
|