crewAIInc / crewAIInc/crewAI

[FEATURE] Payment tools for agent-executed transactions (batch payments, escrow, balance)

Open
#7,558 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature-request
Dominant language
Python
Stars
58.8k
Forks
8.5k
Avg merge
1d 15h
Merged PRs (30d)
109

Description

Feature Area

Integration with external tools

Is your feature request related to a an existing bug? Please link it here.

NA

Describe the solution you'd like

crewai-tools has no way for an agent to move funds. Agents that coordinate work across
services (paying contributors, settling API usage, funding sub-agents) currently have to
hand off to a human or to custom code outside the toolset.

Proposed: a set of tools backed by the Spraay x402 payment gateway (spraay.app) so
agents can pay natively across chains:

  • SpraayBatchPaymentTool — validate, estimate gas, and execute batch payments to up to
    200 recipients in a single transaction across Base and 16 supported chains.
  • SpraayEscrowTool — create, release, and refund milestone escrows for agent-to-agent
    or agent-to-human work.
  • SpraayBalanceTool — check native and ERC-20 balances before committing to a payment.

Tools follow the existing crewai-tools pattern: BaseTool subclasses, Pydantic input
schemas, lazy imports for optional dependencies, and structured error returns.

Describe alternatives you've considered
  • Generic web-request tools: no chain awareness, no gas estimation, no structured
    validation of recipients/amounts, and the agent has to assemble raw calldata.
  • Wallet-SDK-specific tools: tie the integration to one wallet vendor and one chain.
  • Leaving payments outside the toolset: breaks the agent loop and requires custom
    human-in-the-loop handoffs for every transaction.
Additional context

Implementation already exists in #6609 (auto-closed by the first-time-contributor policy
because it predates the issue requirement). It has passed two CodeRabbit review rounds,
is rebased on main, includes 21 unit tests, and is mypy/ruff clean. Will link this issue
from the PR and reopen it.

Related: #7541 / #7542 propose a verification tool intended to sit alongside these
payment tools as a follow-up.

Willingness to Contribute

Yes, I'd be happy to submit a pull request

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the existing implementation in #6609 and its 21 unit tests, then compare it with the requested batch payment, escrow, and balance tools. Confirm the implementation covers the stated chains, validation, gas estimation, lazy imports, and structured errors; run the tests plus mypy and ruff to verify completion.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
blockchain, payments
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.