- Clone this repository and
cdinto the repository directory - Run
pip install -r requirements-docs.txt - Run
mkdocs serve, edit.mdfiles, and live preview - Contribute docs changes as usual
- The A2A docs use mkdocs and the mkdocs-material theme
- All of the source documentation / Markdown files related to the A2A docs are
in the
docs/directory in the A2A repository mkdocs.ymlin the repository root contains all of the docs config, including the site navigation and organization- There is a GitHub Action in
.github/workflows/docs.ymlthat builds and publishes the docs and pushes the built assets to thegh-pagesbranch in this repository usingmkdocs gh-deploy --force. This happens automatically for all commits / merges tomain. - The A2A documentation is hosted in GitHub pages, and the settings for this are in the A2A repository settings in GitHub.
AI agents are a first-class audience for these docs. Alongside the HTML site we publish three plain-text files at the site root:
llms.txt— a curated index following the llms.txt convention: a short summary plus one-line descriptions of the pages worth reading. Hand-maintained atdocs/llms.txt; update it whenever a page is added, renamed, or removed.llms-reference.txt— a condensed, non-normative protocol reference (core objects, RPC methods, task states). Hand-maintained atdocs/llms-reference.txt; update it when the proto changes. Both files state the released protocol version in their opening lines, so they need a pass at each release.llms-full.txt— every doc page, the normative proto, and the Python SDK reference concatenated into one file, with layout-only markup stripped. Generated byscripts/build_llms_full.shduring the docs build and ignored by git, so don't edit or commit it by hand.
scripts/deploy_root_files.sh copies all three, plus robots.txt, to the root of
the gh-pages branch. MkDocs also copies them into each versioned site, so
/latest/llms.txt works too.
When writing docs, keep them readable without a browser:
- Put content in Markdown. Styling wrappers such as
<div class="grid cards">are fine, andllms-full.txtstrips them — but no information should live only inside HTML or a JavaScript widget, because that is what gets dropped. - Give every diagram a text equivalent: descriptive alt text for images, and a caption or surrounding paragraph that states what the diagram shows.
- Prefer real Markdown headings, lists, and tables over styled
<div>blocks.
The Python SDK documentation is built using Sphinx.
Ensure you have installed the documentation dependencies:
pip install -r ../../requirements-docs.txt-
Run the following command to build the HTML documentation:
sphinx-build -b html docs/sdk/python docs/sdk/python/api
-
The generated HTML files will be in the
sdk/python/apidirectory. You can opensdk/python/api/index.htmlin your browser to view the documentation.