Skip to content

docs: add AGENT.md for AI agent contributors#186

Open
ayushozha wants to merge 1 commit intogoogle-agentic-commerce:mainfrom
ayushozha:docs/add-agent-md
Open

docs: add AGENT.md for AI agent contributors#186
ayushozha wants to merge 1 commit intogoogle-agentic-commerce:mainfrom
ayushozha:docs/add-agent-md

Conversation

@ayushozha
Copy link

Summary

  • Adds an AGENT.md file at the repo root providing a structured overview for AI agents and automated contributors working in this codebase
  • Covers project description, repository structure, key concepts (mandates, roles, HP/HNP flows), how to run samples, coding conventions, and contribution guidelines
  • Derived from existing README.md, specification, glossary, and source code

Fixes #49

Test plan

  • Verify AGENT.md renders correctly on GitHub
  • Confirm all referenced file paths and directories exist in the repo
  • Check that instructions (running samples, installing types package) are accurate

🤖 Generated with Claude Code

Provides repository overview, structure, key concepts, and coding
guidelines for AI agents working in this codebase.

Fixes google-agentic-commerce#49

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ayushozha ayushozha requested a review from a team as a code owner March 18, 2026 08:26
@google-cla
Copy link

google-cla bot commented Mar 18, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces a dedicated AGENT.md file to the repository. The primary purpose of this new documentation is to provide a clear and structured guide for AI agents and other automated systems that interact with or contribute to the codebase. By centralizing information on project structure, key concepts, and operational guidelines, this change aims to streamline automated processes and facilitate more effective AI-driven development within the project.

Highlights

  • New Documentation for AI Agents: A new file, AGENT.md, has been added to the repository root, specifically designed to provide a structured overview for AI agents and automated contributors.
  • Comprehensive Guide: The AGENT.md file covers essential aspects such as the project description, repository structure, key concepts (mandates, roles, payment flows), instructions for running samples, coding conventions, and contribution guidelines.
  • Derived Content: The content for AGENT.md was compiled from existing README.md, specification documents, glossary, and source code, consolidating relevant information for automated systems.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces an AGENT.md file, which serves as a guide for AI agents and automated contributors. The document is comprehensive and well-structured. My feedback includes a minor formatting suggestion to improve the readability of the repository structure diagram for better clarity.

Comment on lines +19 to +56
```
AP2/
├── src/ap2/types/ # Core protocol type definitions (Python/Pydantic)
│ ├── mandate.py # IntentMandate, CartMandate, PaymentMandate
│ ├── payment_request.py # PaymentRequest, PaymentResponse (W3C-based)
│ ├── payment_receipt.py # Payment receipt types
│ └── contact_picker.py # Contact picker types
├── samples/
│ ├── python/
│ │ ├── scenarios/ # Runnable demo scenarios
│ │ │ └── a2a/
│ │ │ └── human-present/
│ │ │ ├── cards/
│ │ │ └── x402/
│ │ └── src/
│ │ ├── roles/ # Agent implementations by role
│ │ │ ├── shopping_agent/
│ │ │ ├── merchant_agent/
│ │ │ ├── merchant_payment_processor_agent/
│ │ │ └── credentials_provider_agent/
│ │ └── common/ # Shared utilities (A2A helpers, config, server)
│ ├── android/ # Android-based shopping assistant samples
│ └── go/ # Go-based samples
├── docs/
│ ├── specification.md # Full protocol specification
│ ├── glossary.md # Term definitions
│ ├── faq.md
│ ├── roadmap.md
│ └── topics/ # Additional documentation topics
├── scripts/
│ └── format.sh # Code formatting script
├── pyproject.toml # Python package config (uv workspace)
├── mkdocs.yml # Documentation site config
├── CONTRIBUTING.md # Contribution guidelines and CLA info
├── CODE_OF_CONDUCT.md
├── SECURITY.md
└── LICENSE # Apache 2.0
```
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

low

The comments in the repository structure diagram are not aligned, which makes it slightly harder to read. For better readability and a cleaner presentation, it's good practice to align all comments to start at the same column.

AP2/
├── src/ap2/types/          # Core protocol type definitions (Python/Pydantic)
│   ├── mandate.py          # IntentMandate, CartMandate, PaymentMandate
│   ├── payment_request.py  # PaymentRequest, PaymentResponse (W3C-based)
│   ├── payment_receipt.py  # Payment receipt types
│   └── contact_picker.py   # Contact picker types
├── samples/
│   ├── python/
│   │   ├── scenarios/      # Runnable demo scenarios
│   │   │   └── a2a/
│   │   │       └── human-present/
│   │   │           ├── cards/
│   │   │           └── x402/
│   │   └── src/
│   │       ├── roles/      # Agent implementations by role
│   │       │   ├── shopping_agent/
│   │       │   ├── merchant_agent/
│   │       │   ├── merchant_payment_processor_agent/
│   │       │   └── credentials_provider_agent/
│   │       └── common/     # Shared utilities (A2A helpers, config, server)
│   ├── android/            # Android-based shopping assistant samples
│   └── go/                 # Go-based samples
├── docs/
│   ├── specification.md    # Full protocol specification
│   ├── glossary.md         # Term definitions
│   ├── faq.md
│   ├── roadmap.md
│   └── topics/             # Additional documentation topics
├── scripts/
│   └── format.sh           # Code formatting script
├── pyproject.toml          # Python package config (uv workspace)
├── mkdocs.yml              # Documentation site config
├── CONTRIBUTING.md         # Contribution guidelines and CLA info
├── CODE_OF_CONDUCT.md
├── SECURITY.md
└── LICENSE                 # Apache 2.0

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat]: Add a official GEMINI.md or AGENT.md file

1 participant