AP2  by google-agentic-commerce

Protocol for secure, interoperable AI-driven payments

Created 3 months ago
665 stars

Top 50.6% on SourcePulse

GitHubView on GitHub
Project Summary

This repository provides code samples and demonstrations for the Agent Payments Protocol (AP2), designed to build a secure and interoperable future for AI-driven payments. It targets developers creating AI agents for commerce, offering a foundational protocol to enable secure and standardized payment interactions.

How It Works

The Agent Payments Protocol (AP2) establishes standards for secure and interoperable AI-driven financial transactions. While the provided samples leverage Google's Agent Development Kit (ADK) and Gemini 2.5 Flash for demonstration, the protocol itself is designed to be tool-agnostic, allowing developers to integrate with any preferred agent framework or large language model. This approach promotes flexibility and broad adoption across diverse AI agent ecosystems.

Quick Start & Requirements

  • Primary install: uv pip install git+https://github.com/google-agentic-commerce/AP2.git@main for the AP2 Types package.
  • Prerequisites: Python 3.10 or higher, and a Google API key obtained from Google AI Studio.
  • Setup: Configure the GOOGLE_API_KEY either as an environment variable (export GOOGLE_API_KEY=your_key) or within a .env file at the repository root.
  • Execution: Navigate to the specific scenario directory (e.g., samples/python/scenarios/your-scenario-name/) and run the provided run.sh script, which handles dependency installation and agent startup. Follow individual scenario READMEs for detailed instructions.

Highlighted Details

  • Features code samples and curated scenarios demonstrating key AP2 components for both Python and Android agent development.
  • The protocol is designed for security and interoperability in AI-driven commerce.
  • While samples use ADK and Gemini 2.5 Flash, the core AP2 protocol remains independent of specific AI models or agent frameworks.
  • The AP2 Types package, defining core protocol objects, is installable directly from the main branch via pip.

Maintenance & Community

No specific details regarding maintainers, community channels, or project roadmaps are provided in the available documentation.

Licensing & Compatibility

The license type is not explicitly stated in the provided information.

Limitations & Caveats

The repository primarily offers code samples and demonstrations; the protocol's full implementation details may require further development. While the protocol is tool-agnostic, the provided samples rely on specific technologies like ADK and Gemini 2.5 Flash, which might influence initial understanding or setup. The AP2 Types package is currently distributed directly from GitHub, with a PyPI package planned for future release, indicating potential for evolving distribution methods.

Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
27
Issues (30d)
15
Star History
687 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.