Skip to content

feat(tools): Add Nory x402 payment tools#10520

Closed
TheMemeBanker wants to merge 1 commit intodeepset-ai:mainfrom
TheMemeBanker:add-nory-x402-tools
Closed

feat(tools): Add Nory x402 payment tools#10520
TheMemeBanker wants to merge 1 commit intodeepset-ai:mainfrom
TheMemeBanker:add-nory-x402-tools

Conversation

@TheMemeBanker
Copy link
Copy Markdown

Summary

Adds tools for AI agents to make payments using the x402 HTTP payment protocol via Nory.

New Tools

Tool Description
nory_get_payment_requirements Get payment requirements for a resource (amount, supported networks, wallet address)
nory_verify_payment Verify a signed payment transaction before settlement
nory_settle_payment Submit a verified payment to the blockchain (~400ms)
nory_lookup_transaction Check the status of a previously submitted payment
nory_health_check Check Nory service health and supported networks

Supported Networks

  • Solana (mainnet/devnet)
  • Base, Polygon, Arbitrum, Optimism, Avalanche, Sei, IoTeX (all mainnet)

Use Cases

AI agents can now:

  • Pay for premium API access on-the-fly
  • Handle HTTP 402 Payment Required responses automatically
  • Make micropayments for AI-to-AI services
  • Access paid resources without pre-configured subscriptions

Usage Example

from haystack.tools import nory_get_payment_requirements, nory_settle_payment, NORY_X402_TOOLS
from haystack.components.generators.chat import OpenAIChatGenerator
from haystack.dataclasses import ChatMessage

# Use individual tools
requirements = nory_get_payment_requirements.invoke(
    resource="/api/premium/data",
    amount="0.10",
    network="solana-mainnet"
)

# Or use all tools with an agent
generator = OpenAIChatGenerator(model="gpt-4")
generator.run(messages=[...], tools=NORY_X402_TOOLS)

Documentation

🤖 Generated with Claude Code

@TheMemeBanker TheMemeBanker requested a review from a team as a code owner February 6, 2026 15:10
@TheMemeBanker TheMemeBanker requested review from julian-risch and removed request for a team February 6, 2026 15:10
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 6, 2026

Someone is attempting to deploy a commit to the deepset Team on Vercel.

A member of the Team first needs to authorize it.

@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Feb 6, 2026

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions Bot added the type:documentation Improvements on the docs label Feb 6, 2026
@TheMemeBanker
Copy link
Copy Markdown
Author

Hi Haystack team! Following up on this PR. The x402 payment tools would complement Haystack's existing tool ecosystem nicely, enabling agents to access paid APIs and premium data sources. Let me know if there's anything I can improve or adjust!

@TheMemeBanker
Copy link
Copy Markdown
Author

recheck

1 similar comment
@TheMemeBanker
Copy link
Copy Markdown
Author

recheck

@TheMemeBanker
Copy link
Copy Markdown
Author

I have read the CLA Document and I hereby sign the CLA

Adds tools for AI agents to make payments using the x402 HTTP protocol.

New tools:
- nory_get_payment_requirements: Get payment requirements for a resource
- nory_verify_payment: Verify signed payment transactions
- nory_settle_payment: Submit payments for on-chain settlement
- nory_lookup_transaction: Check transaction status
- nory_health_check: Check service health

Features:
- Supports Solana and 7 EVM chains
- Sub-400ms payment settlement
- Optional API key authentication

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@TheMemeBanker
Copy link
Copy Markdown
Author

Update: We've now released the full x402 SDK suite:

  • nory-x402-middleware - Add paywalls to any API
  • nory-x402-payer - Auto-pay client for agents (NEW)
  • nory-mcp-server - MCP/Claude integration

With this Haystack integration, users would have native payment tools for their pipelines. The payer SDK handles the other side - when Haystack agents encounter paid APIs, they can pay automatically.

CLA signed above. Ready for review when you have time!

@julian-risch
Copy link
Copy Markdown
Member

Hello @TheMemeBanker, Thank you for the suggestion to add payment tools and opening this pull request. The new tools that you suggest to add are a better fit for a Haystack integration than for merging them into the Haystack core. I suggest that you publish this integration yourself as a pypi package and then open a PR in the following repo to make your integration more visible with an integration page: https://github.com/deepset-ai/haystack-integrations
Other successful community integrations, for example the MilvusDocumentStore are also maintained by our community in separate repositories and listed in https://github.com/deepset-ai/haystack-integrations .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:documentation Improvements on the docs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants