Coding with AI¶
使用 AI 进行编程¶
The Agent Development Kit (ADK) documentation supports the
/llms.txt standard, providing a machine-readable index
of the documentation optimized for Large Language Models (LLMs). This allows you
to easily use the ADK documentation as context in your AI-powered development
environment.
智能体开发工具包(ADK)文档支持 /llms.txt 标准,提供针对大型语言模型(LLM)优化的文档的机器可读索引。这使您能够轻松地将 ADK 文档用作您的 AI 驱动开发环境中的上下文。
What is llms.txt?¶
什么是 llms.txt?¶
llms.txt is a standardized text file that acts as a map for LLMs, listing the
most important documentation pages and their descriptions. This helps AI tools
understand the structure of ADK documentation and retrieve relevant
information to answer your questions.
llms.txt 是一个标准化文本文件,充当 LLM 的地图,列出最重要的文档页面及其描述。这有助于 AI 工具了解 ADK 文档的结构并检索相关信息来回答您的问题。
The ADK documentation provides the following files that are automatically generated with every update:
ADK 文档提供以下文件,每次更新时自动生成:
| File | Best For... | URL |
|---|---|---|
llms.txt |
Tools that can fetch links dynamically | https://google.github.io/adk-docs/llms.txt |
llms-full.txt |
Tools that need a single, static text dump of the entire site | https://google.github.io/adk-docs/llms-full.txt |
| 文件 | 最适合... | URL |
|---|---|---|
llms.txt |
可以动态获取链接的工具 | https://google.github.io/adk-docs/llms.txt |
llms-full.txt |
需要整个站点的单个静态文本转储的工具 | https://google.github.io/adk-docs/llms-full.txt |
Usage in Development Tools¶
在开发工具中的使用¶
You can use these files to power your AI coding assistants with ADK knowledge. This functionality allows your agents to autonomously search and read the ADK documentation while planning tasks and generating code.
您可以使用这些文件为您的 AI 编码助手提供 ADK 知识。此功能允许您的智能体在规划任务和生成代码时自主搜索和阅读 ADK 文档。
Gemini CLI¶
Gemini CLI¶
The Gemini CLI can be configured to query the ADK documentation using the ADK Docs Extension.
Gemini CLI 可以配置为使用 ADK 文档扩展查询 ADK 文档。
Installation: 安装:
To install extension, run following command:
要安装扩展,请运行以下命令:
Usage: 使用:
Once installed, extension is automatically enabled. You can ask questions
about ADK directly in the Gemini CLI, and it will use the llms.txt file and
ADK documentation to provide accurate answers and generate code.
安装后,扩展会自动启用。您可以直接在 Gemini CLI 中询问有关 ADK 的问题,它将使用 llms.txt 文件和 ADK 文档提供准确的答案并生成代码。
For example, you can ask following question from within Gemini CLI:
例如,您可以在 Gemini CLI 中询问以下问题:
How do I create a function tool using Agent Development Kit? 我如何使用智能体开发工具包创建函数工具?
Antigravity¶
Antigravity¶
The Antigravity IDE can be configured to access
the ADK documentation by running a custom MCP server that points to the
llms.txt file for ADK.
Antigravity IDE 可以配置为通过运行指向 ADK 的 llms.txt 文件的自定义 MCP 服务器来访问 ADK 文档。
Prerequisites: 先决条件:
Ensure you have uv tool installed, as this
configuration uses uvx to run the documentation server without manual
installation.
确保您已安装 uv 工具,因为此配置使用 uvx 来运行文档服务器而无需手动安装。
Configuration: 配置:
- Open the MCP store via the ... (more) menu at top of the editor's agent panel.
- 通过编辑器代理面板顶部的 ...(更多)菜单打开 MCP 商店。
- Click on Manage MCP Servers.
- 单击管理 MCP 服务器。
- Click on View raw config.
- 单击查看原始配置。
- Add following entry to
mcp_config.jsonwith your custom MCP server configuration. If this is your first MCP server, you can paste the entire code block: -
将以下条目添加到
mcp_config.json以及您的自定义 MCP 服务器配置。如果这是您的第一个 MCP 服务器,您可以粘贴整个代码块:
Refer to the Antigravity MCP documentation for more information on managing MCP servers.
有关管理 MCP 服务器的更多信息,请参阅 Antigravity MCP 文档。