[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-72365":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},72365,"AP2","google-agentic-commerce\u002FAP2","google-agentic-commerce","Building a Secure and Interoperable Future for AI-Driven Payments.","https:\u002F\u002Fap2-protocol.org\u002F",null,"Python",3061,459,70,47,0,3,19,75,9,29.99,"Apache License 2.0",false,"main",true,[],"2026-06-12 02:03:02","# Agent Payments Protocol (AP2)\n\n[![Apache License](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-Apache_2.0-blue.svg)](LICENSE)\n[![Ask DeepWiki](https:\u002F\u002Fdeepwiki.com\u002Fbadge.svg)](https:\u002F\u002Fdeepwiki.com\u002Fgoogle-agentic-commerce\u002FAP2)\n\n\u003C!-- markdownlint-disable MD041 -->\n\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fassets\u002Fap2_graphic.png\" alt=\"Agent Payments Protocol Graphic\">\n\u003C\u002Fp>\n\nThis repository contains code samples and demos of the Agent Payments Protocol.\n\n## Intro to AP2 Video\n\n[![A2A Intro Video](https:\u002F\u002Fimg.youtube.com\u002Fvi\u002FjSHj0z9Gi24\u002Fhqdefault.jpg)](https:\u002F\u002Fyoutu.be\u002FjSHj0z9Gi24?si=JyzMu2wZCMpVuxvv)\n\n### AP2 on The Agent Factory - September 2025\n\n[![The Agent Factory (September 2025) - Episode 8: Agent payments, can you do my shopping?](https:\u002F\u002Fimg.youtube.com\u002Fvi\u002FT1MtWnEYXM0\u002Fhqdefault.jpg)](https:\u002F\u002Fyoutu.be\u002FT1MtWnEYXM0?si=QkJWnAiav0JAP9F6)\n\n## About the Samples\n\nThese samples use [Agent Development Kit (ADK)](https:\u002F\u002Fgoogle.github.io\u002Fadk-docs\u002F) and Gemini 3.1 Flash Lite Preview.\n\nThe Agent Payments Protocol doesn't require the use of either. While these were\nused in the samples, you're free to use any tools you prefer to build your\nagents.\n\n## Navigating the Repository\n\nThe top-level layout is:\n\n- [**`docs\u002F`**](docs\u002F) — specification, flows, FAQ, and MkDocs sources.\n- [**`code\u002F`**](code\u002F) — all source code, organized by artifact:\n    - [**`code\u002Fsdk\u002F`**](code\u002Fsdk\u002F) — the AP2 SDK (Python lives at\n      [`code\u002Fsdk\u002Fpython\u002Fap2\u002F`](code\u002Fsdk\u002Fpython\u002Fap2\u002F)).\n    - [**`code\u002Fsamples\u002F`**](code\u002Fsamples\u002F) — reference implementations and\n      scenarios.\n    - [**`code\u002Fweb-client\u002F`**](code\u002Fweb-client\u002F) — the demo web client\n      (Vite + React).\n\nThe **`samples`** directory contains a collection of curated scenarios meant to\ndemonstrate the key components of the Agent Payments Protocol.\n\nThe scenarios can be found in:\n\n- [**`code\u002Fsamples\u002Fpython\u002Fscenarios`**](code\u002Fsamples\u002Fpython\u002Fscenarios) — Python.\n- [**`code\u002Fsamples\u002Fgo\u002Fscenarios`**](code\u002Fsamples\u002Fgo\u002Fscenarios) — Go.\n- [**`code\u002Fsamples\u002Fandroid\u002Fscenarios`**](code\u002Fsamples\u002Fandroid\u002Fscenarios) — Android.\n\nEach scenario contains:\n\n- a `README.md` file describing the scenario and instructions for running it.\n- a `run.sh` script to simplify the process of running the scenario locally.\n\nThis demonstration features various agents and servers, with most source code\nlocated in [**`code\u002Fsamples\u002Fpython\u002Fsrc`**](code\u002Fsamples\u002Fpython\u002Fsrc\u002F).\nScenarios that use an Android app as the shopping assistant have their source\ncode in [**`code\u002Fsamples\u002Fandroid`**](code\u002Fsamples\u002Fandroid\u002F); Go roles live in\n[**`code\u002Fsamples\u002Fgo`**](code\u002Fsamples\u002Fgo\u002F).\n\nFor the SDK API reference see\n[**`code\u002Fsdk\u002Fpython\u002Fap2\u002Fsdk\u002FREADME.md`**](code\u002Fsdk\u002Fpython\u002Fap2\u002Fsdk\u002FREADME.md).\n\n## Quickstart\n\n### Prerequisites\n\n- Python 3.11 or higher\n- [`uv`](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002Fgetting-started\u002Finstallation\u002F) package manager\n\n### Setup\n\nYou can authenticate using either a Google API Key or Vertex AI.\n\nFor either method, you can set the required credentials as environment variables in your shell or place them in a `.env` file at the root of your project.\n\n#### Option 1: Google API Key (Recommended for development)\n\n1. Obtain a Google API key from [Google AI Studio](http:\u002F\u002Faistudio.google.com\u002Fapikey).\n2. Set the `GOOGLE_API_KEY` environment variable.\n\n    - **As an environment variable:**\n\n        ```sh\n        export GOOGLE_API_KEY='your_key'\n        ```\n\n    - **In a `.env` file:**\n\n        ```sh\n        GOOGLE_API_KEY='your_key'\n        ```\n\n#### Option 2: [Vertex AI](https:\u002F\u002Fcloud.google.com\u002Fvertex-ai) (Recommended for production)\n\n1. **Configure your environment to use Vertex AI.**\n    - **As environment variables:**\n\n        ```sh\n        export GOOGLE_GENAI_USE_VERTEXAI=true\n        export GOOGLE_CLOUD_PROJECT='your-project-id'\n        export GOOGLE_CLOUD_LOCATION='global' # or your preferred region\n        ```\n\n    - **In a `.env` file:**\n\n        ```sh\n        GOOGLE_GENAI_USE_VERTEXAI=true\n        GOOGLE_CLOUD_PROJECT='your-project-id'\n        GOOGLE_CLOUD_LOCATION='global'\n        ```\n\n2. **Authenticate your application.**\n    - **Using the [`gcloud` CLI](https:\u002F\u002Fcloud.google.com\u002Fsdk\u002Fdocs\u002Finstall):**\n\n        ```sh\n        gcloud auth application-default login\n        ```\n\n    - **Using a Service Account:**\n\n        ```sh\n        export GOOGLE_APPLICATION_CREDENTIALS='\u002Fpath\u002Fto\u002Fyour\u002Fservice-account-key.json'\n        ```\n\n### How to Run a Scenario\n\nTo run a specific scenario, follow the instructions in its `README.md`. It will\ngenerally follow this pattern:\n\n1. Navigate to the root of the repository.\n\n    ```sh\n    cd AP2\n    ```\n\n1. Run the run script to install dependencies & start the agents. The exact\n   path depends on the scenario — for example, the human-present card\n   payment flow:\n\n    ```sh\n    bash code\u002Fsamples\u002Fpython\u002Fscenarios\u002Fa2a\u002Fhuman-present\u002Fcards\u002Frun.sh\n    ```\n\n    Other scenarios live alongside it under\n    `code\u002Fsamples\u002Fpython\u002Fscenarios\u002F`, `code\u002Fsamples\u002Fgo\u002Fscenarios\u002F`, and\n    `code\u002Fsamples\u002Fandroid\u002Fscenarios\u002F` (see each scenario's `README.md`\n    for the exact invocation).\n\n1. Navigate to the Shopping Agent URL and begin engaging.\n\n### Installing the AP2 Types Package\n\nThe protocol's core objects are defined under\n[`code\u002Fsdk\u002Fpython\u002Fap2\u002F`](code\u002Fsdk\u002Fpython\u002Fap2\u002F) — Pydantic models in\n[`models\u002F`](code\u002Fsdk\u002Fpython\u002Fap2\u002Fmodels\u002F) and\n[`sdk\u002Fgenerated\u002F`](code\u002Fsdk\u002Fpython\u002Fap2\u002Fsdk\u002Fgenerated\u002F), canonical JSON schemas\nin [`schemas\u002F`](code\u002Fsdk\u002Fpython\u002Fap2\u002Fschemas\u002F). A PyPI package will be published\nat a later time. Until then, you can install the package directly using this\ncommand:\n\n```sh\nuv pip install git+https:\u002F\u002Fgithub.com\u002Fgoogle-agentic-commerce\u002FAP2.git@main\n```\n","Agent Payments Protocol (AP2) 项目旨在构建一个安全且可互操作的未来AI驱动支付系统。其核心功能包括通过Agent Development Kit (ADK) 和Gemini 3.1 Flash Lite Preview实现智能代理间的支付流程自动化，支持多种编程语言如Python、Go和Android等进行开发。技术特点上，AP2提供了丰富的代码示例与演示场景，并不强制依赖特定工具集，给予开发者高度自由选择适合自己的技术栈来创建支付代理。此项目特别适用于需要增强支付流程智能化及安全性，同时追求跨平台兼容性的电子商务、金融服务等领域。",2,"2026-06-11 03:41:32","high_star"]