Logo van Zen7-Payment-Agent

Zen7-Payment-Agent

Organisatie
Zen7-Labs

Zen7 Payment Agent is the first implementation project of DePA (Decentralized Payment Agent), pioneers next-generation intelligent payment infrastructure.

UitgeverZen7-Labs
RepositoryZen7-Payment-Agent
TaalPython
Forks
13
Sterren
179
Beschikbare tools
0
Transporttypestdio
Categorieën
LicentieApache-2.0
Links
  • Koppel tools aan AI-workflows

    Zen7-Payment-Agent biedt MCP-functionaliteit die compatibele AI-clients en agenten kunnen gebruiken.

  • 0 beschikbare tools

    Bekijk hieronder de aanroepbare acties, inclusief namen en beschrijvingen als de server die beschikbaar stelt.

  • Configuratie om direct te kopiëren

    Gebruik de installatievoorbeelden om deze server in je favoriete MCP-client te configureren.

  • Indicatoren van opensource-interesse

    179 sterren en 13 forks in de gekoppelde repository.

Zen7 Payment Agent

License Python Built with uv 中文版本

Real-time progress updates can be viewed on page Real-time progress For support on the x402 protocol, please click here

Zen7 Payment Agent is the first practical implementation of DePA (Decentralized Payment Agent), pioneering the next generation of intelligent payment infrastructure. It not only fully implements the core functionalities of DePA but also successfully deploys innovative application cases in the agentic commerce domain.

As the first practical project in the DePA ecosystem, Zen7 implements several key features: automated encrypted payments between agents, a "permissionless authorization" mechanism, and LLM-driven intent recognition and interaction.

Zen7 Payment Agent adopts a multi-agent collaborative architecture, supporting both A2A and MCP protocols, as well as custodial and non-custodial payment models. It provides a comprehensive payment solution for AI Agents and native Dapp applications with multi-chain, multi-currency, multi-wallet support, high-frequency transactions, gasless operations, and passwordless authentication.

Navigating the Repository

This repository contains the complete implementation of Zen7 Payment Agent, showcasing the core components and architectural design based on the Zen7 Payment Agent (Decentralized Payment Agent) protocol.

Core Directory Structure

The core implementation of the project is located in the following key directories:

host_agent - The core implementation of the multi-agent collaborative architecture. The host agent uses the gemini-2.0-flash-lite model as the core coordinator, responsible for query understanding, state management, and response coordination. The sub-agent system (sub_agents/) contains five specialized agents: payer_agent handles order creation for the payer, EIP-712 signature generation, and wallet balance verification; settlement_agent focuses on the settlement process, confirming payment details, executing on-chain transactions, and monitoring transaction status; payee_agent handles payee-related operations, receiving settlement notifications, confirming order creation, and notifying payment completion; order_agent manages order processing and intent recognition, automatically routing to different agents; allowance_agent provides authorization quota query functionality, supporting multi-chain token authorization queries.

a2a_server & mcp_server - Protocol adaptation layer implementation, providing diverse integration methods. a2a_server implements Google's Agent-to-Agent protocol using the A2AStarletteApplication framework, exposing agent capabilities through AgentCard, supporting inter-agent collaborative communication, and running on port 10000 by default. mcp_server implements Model Context Protocol integration based on the FastMCP framework, encapsulating payment functionality as tool APIs, providing the core proceed_payment_and_settlement_detail_info tool, supporting SSE (Server-Sent Events) transport, and running on port 8015 by default.

dao - Data access layer implementation, integrating PostgreSQL + SQLModel for data persistence. Includes database model definitions (model.py), database connection management (database.py), and data access interfaces (app.py), supporting complete business data management for orders, payments, settlements, intents, and audit events.

task_manager - Task management layer implementation with factory pattern design. payment_service.py provides a unified interface for payment services, task_scoped_manager.py implements task scope management, ensuring isolation and lifecycle management for different payment tasks.

services - Complete blockchain service implementation. Signature services support both EVM chains (execute_sign.py) and Solana chain (execute_sign_solana.py), with EVM providing EIP-712 typed data signing and supporting permit signatures for USDC and DAI; transfer handlers adopt base class abstraction design (base_handler.py), divided into custodial/ mode (backend manages wallets to simplify user experience) and non_custodial/ mode (users control private keys for enhanced security), supporting both EVM (evm_transfer_handler.py) and Solana (solana_transfer_handler.py) blockchains; data service layer includes intent recording (intent.py), audit events (audit_event.py), settlement batches (settlement_batch.py), and settlement details (settlement_detail.py), enabling full transaction lifecycle tracking; constant configuration (constants.py) centrally manages blockchain network configurations, contract addresses, and chain IDs; permit execution (execute_permit.py) handles ERC-20 token authorization and permit execution.

Companion Console Demo Application

The companion console demo application is located in a separate Zen7-Console-Demo repository, providing users with a complete interactive interface and payment flow demonstration, allowing developers to intuitively experience the workflow of the entire payment system. It includes complete payment flows for both A2A and MCP clients in e-commerce scenarios.

  • Shopping Agent Client demonstrates how to use payment agent services in e-commerce scenarios, implementing features such as product browsing, ordering, and payment.

Technology Stack and Compatibility

Supported Blockchain Networks:

  • EVM Compatible Chains: Ethereum Sepolia, Base Sepolia, Polygon Amoy, BNB Chain Testnet
  • Solana: Devnet, Testnet

Compatible Token Standards:

  • EVM: USDC (Version 2), DAI (Version 1)
  • Solana: SPL Token

Signature Standards:

  • EVM: EIP-712 Typed Data Signing
  • Solana: Ed25519 Signature

Wallet Integration: MetaMask, Coinbase Wallet, Phantom Wallet

Data Persistence: PostgreSQL + SQLModel ORM

This design provides developers with a flexible testing environment, supporting a complete payment solution with multi-chain and multi-currency capabilities, while ensuring good compatibility with mainstream wallets and blockchain networks.

Quick Start

Environment Setup

Development Guide

Security Considerations

  • Private Key Security: Private keys in the test environment are only for development; use secure key management solutions in production
  • Network Environment: Currently supports testnets; production environments require corresponding mainnet configurations
  • Token Management: Ensure test wallets have sufficient test tokens for transactions
  • API Security: Configure appropriate authentication and authorization mechanisms in production environments

Support

If you encounter issues or need help, please:

  • Check the relevant guides in the documentation directory
  • Submit issues on GitHub Issues
  • Contact the development team

About Zen7 Labs

Zen7 Labs is dedicated to building the next generation of decentralized payment infrastructure, focusing on providing innovative payment solutions for Agentic Commerce. By simplifying blockchain payment experiences through AI agent technology, we are pioneering a new paradigm of payments in the agent economy era, making commercial interactions between agents more efficient, secure, and intelligent.


Citation

If you find Zen7 Payment Agent helpful in your research or project, please cite it as:

bibtex
@misc{zen7paymentagent,
  author = {Zen7 Labs},
  title = {Zen7 Payment Agent: A Dedicated Payment Network for Every Intelligent Agent.},
  year = {2025},
  publisher = {GitHub},
  url = {https://github.com/Zen7-Labs/Zen7-Payment-Agent}
}

License

Apache License Version 2.0

Gebruik Zen7-Payment-Agent MCP met meerdere AI-modellen

TypingMind koppelt MCP-tools aan de werkruimte. Zodra Zen7-Payment-Agent is verbonden, kun je deze dus met verschillende AI-modellen in TypingMind gebruiken, zonder de verbinding voor elk model apart in te stellen. Deze MCP-integratie draait lokaal via de TypingMind MCP-connector op je apparaat.

Installatiehandleiding voor de lokale connector

Gebruik dit als de MCP-server toegang nodig heeft tot lokale bestanden, apps of privébronnen op je computer.

1

Open de MCP-instellingen

Ga in TypingMind naar Instellingen, Geavanceerde instellingen en vervolgens Model Context Protocol. Kies daar Connector instellen.

  1. Open TypingMind in je browser.
  2. Klik op het pictogram Instellingen.
  3. Ga naar Geavanceerde instellingen.
  4. Open het gedeelte Model Context Protocol.
  5. Klik op Connector instellen en kies Dit apparaat.
Instelscherm voor de TypingMind MCP-connector met Dit apparaat geselecteerd
2

Voer de connectoropdracht uit

Kies Dit apparaat, kopieer de opdracht uit TypingMind en voer deze uit in Terminal. Laat het proces draaien zolang je MCP gebruikt.

  1. Kopieer de installatieopdracht die TypingMind toont.
  2. Open Terminal op macOS of Windows Terminal op Windows.
  3. Plak de opdracht en voer deze uit.
  4. Keur de pakketinstallatie goed als Terminal vraagt of je wilt doorgaan.
  5. Laat het proces in het Terminal-venster draaien zolang je MCP-tools gebruikt.
3

Voeg Zen7-Payment-Agent toe als server

Klik op Servers bewerken zodra de connectorstatus Gereed is en plak de MCP-serverconfiguratie.

  1. Wacht tot de connectorstatus Gereed aangeeft.
  2. Klik op Servers bewerken.
  3. Plak de MCP-serverconfiguratie van Zen7-Payment-Agent.
  4. Sla de serverlijst op.
  5. Vernieuw om te controleren of de connector nog steeds klaar is voor gebruik.
MCP-instellingen van TypingMind met een actieve server en de knop Servers bewerken
{
  "mcpServers": {
    "zen7-payment-agent": {
      "command": "npx",
      "args": [
        "-y",
        "<mcp-server-package>"
      ]
    }
  }
}
4

Gebruik de verbinding met verschillende modellen

Sla de serverlijst op, open Plug-ins en schakel de MCP-tools van Zen7-Payment-Agent in. Selecteer vervolgens een ondersteund AI-model in TypingMind en gebruik de tools in de chat of wijs ze toe aan een AI-agent.

  1. Open de pagina Plug-ins in TypingMind.
  2. Schakel de MCP-tools van Zen7-Payment-Agent in.
  3. Start een chat en kies het AI-model dat je wilt gebruiken.
  4. Gebruik de MCP-tools in een chat of wijs ze toe aan een AI-agent.
  5. Schakel wanneer nodig over naar een ander AI-model zonder opnieuw verbinding te maken met MCP.
TypingMind-chat met ingeschakelde MCP-tools en een geselecteerd AI-model
Kun je Zen7-Payment-Agent gebruiken om me hiermee te helpen?
Zen7-Payment-Agent
Zeker. Ik heb het gelezen.
Dit vond ik met Zen7-Payment-Agent.

Veelgestelde vragen

Waarvoor wordt de MCP-server Zen7-Payment-Agent gebruikt?

Zen7-Payment-Agent is een MCP-server waarmee compatibele AI-clients verbinding kunnen maken met externe tools en context. In TypingMind hoef je deze MCP-server maar één keer toe te voegen om de tools beschikbaar te maken in je AI-werkruimte.

Kan ik Zen7-Payment-Agent MCP met meerdere AI-modellen in TypingMind gebruiken?

Ja. TypingMind verbindt MCP-tools op werkruimteniveau. Daardoor kun je Zen7-Payment-Agent gebruiken met verschillende AI-modellen, zoals Claude, ChatGPT, Gemini of andere modellen die je in TypingMind hebt ingesteld, zonder de MCP-server voor elk model afzonderlijk in te stellen.

Waarom Zen7-Payment-Agent MCP gebruiken met TypingMind?

TypingMind is een van de beste interfaces voor chats met LLM's, omdat het meerdere AI-modellen, prompts, plug-ins, AI-agenten, API-sleutels en MCP-tools samenbrengt in één werkruimte. Als Zen7-Payment-Agent verbonden is, kun je de MCP-tools ervan gebruiken met je favoriete modellen en je chatworkflow overzichtelijk houden in TypingMind.

Hoe verbind ik Zen7-Payment-Agent MCP met TypingMind?

Zen7-Payment-Agent werkt via de lokale MCP-connector van TypingMind. Dit is de beste optie als de MCP-server toegang nodig heeft tot lokale bestanden, desktopapps, opdrachtregeltools of privébronnen op je computer.

Welke tools biedt Zen7-Payment-Agent MCP in TypingMind?

Zen7-Payment-Agent biedt MCP-functies die je kunt inschakelen via de pagina Plug-ins in TypingMind. Je kunt ze gebruiken in chats of toewijzen aan AI-agenten.

Moet ik mijn API-sleutels delen met TypingMind om Zen7-Payment-Agent MCP te gebruiken?

Nee. TypingMind werkt in de eerste plaats lokaal en laat je de controle houden over je modelaanbieders, API-sleutels, prompts en MCP-configuratie. Als Zen7-Payment-Agent authenticatie vereist, voeg je bij het maken van de verbinding de vereiste headers, OAuth-instellingen of lokale configuratie voor die MCP-server toe.

Gerelateerde MCP-servers

Toon alles

Maak nu je eigen AI-werkruimte

Schrijf je in voor onze nieuwsbrief en blijf op de hoogte van nieuwe functies en toekomstige weggeefacties 👇