Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
52dba4d
link: Auth Code grant / flow type
jsoref Nov 4, 2025
418a2ff
spelling: ; otherwise,
jsoref Nov 4, 2025
42ee966
spelling: agents
jsoref Nov 4, 2025
0d98034
spelling: an
jsoref Nov 4, 2025
42a8dd4
spelling: at
jsoref Nov 4, 2025
eeb92ec
spelling: case-sensitive
jsoref Nov 4, 2025
33b1743
spelling: computer
jsoref Nov 4, 2025
a35592b
spelling: config
jsoref Nov 4, 2025
fd720f3
spelling: criteria
jsoref Nov 4, 2025
15dfd19
spelling: custom
jsoref Nov 4, 2025
f8e7e36
spelling: doesn't
jsoref Nov 4, 2025
1e576ff
spelling: especially
jsoref Nov 4, 2025
a456d75
spelling: expensive
jsoref Nov 4, 2025
28a5706
spelling: explanation
jsoref Nov 4, 2025
689379f
spelling: feature
jsoref Nov 4, 2025
5f13ec6
spelling: github
jsoref Nov 4, 2025
96a329b
spelling: information
jsoref Nov 4, 2025
b3b03b8
spelling: initialize
jsoref Nov 4, 2025
e89339e
spelling: invalid
jsoref Nov 4, 2025
5ee9a01
spelling: located
jsoref Nov 4, 2025
5a98aed
spelling: otherwise,
jsoref Nov 4, 2025
cdb2466
spelling: plugin
jsoref Nov 4, 2025
86f3473
spelling: referencing
jsoref Nov 4, 2025
e44c4bc
spelling: relevant
jsoref Nov 4, 2025
a3c90cc
spelling: request
jsoref Nov 4, 2025
546def0
spelling: streaming
jsoref Nov 4, 2025
d142185
spelling: the
jsoref Nov 4, 2025
8641cff
spelling: timestamped
jsoref Nov 4, 2025
972f617
spelling: useful
jsoref Nov 4, 2025
476ca3b
spelling: whether or not
jsoref Nov 4, 2025
0fd8d21
spelling: youtube
jsoref Nov 4, 2025
c3d5e34
Merge branch 'main' into spelling-contributing
hangfei Nov 5, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async def search_adk_source(
max_results: Maximum number of results to return (default: 20)
context_lines: Number of context lines to include around matches (default:
3)
case_sensitive: Whether search should be case sensitive (default: False)
case_sensitive: Whether search should be case-sensitive (default: False)

Returns:
Dict containing search results:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ async def write_config_files(

Args:
configs: Dict mapping file_path to config_content (YAML as string)
backup_existing: Whether to create timest amped backup of existing files
backup_existing: Whether to create timestamped backup of existing files
before overwriting (default: False, User should decide)
create_directories: Whether to create parent directories if they don't exist
(default: True)
Expand Down
4 changes: 2 additions & 2 deletions contributing/samples/adk_answering_agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@

3. **Decide whether to respond**:
* If all the following conditions are met, try to add a comment to the
discussion, otherwise, do not respond:
discussion; otherwise, do not respond:
- The discussion is not closed.
- The latest comment is not from you or other agents (marked as
"Response from XXX Agent").
Expand Down Expand Up @@ -102,7 +102,7 @@
* You **should always** use the `convert_gcs_links_to_https` tool to convert
GCS links (e.g. "gs://...") to HTTPS links.
* **Do not** use the `convert_gcs_links_to_https` tool for non-GCS links.
* Make sure the citation URL is valid. Otherwise do not list this specific
* Make sure the citation URL is valid. Otherwise, do not list this specific
citation.
* Do not respond to any other discussion except the one specified by the user.

Expand Down
2 changes: 1 addition & 1 deletion contributing/samples/adk_answering_agent/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def convert_gcs_to_https(gcs_uri: str) -> Optional[str]:

base_url = "https://google.github.io/adk-docs/"
if os.path.basename(path_after_docs) == "index.md":
# Use the directory path if it is a index file
# Use the directory path if it is an index file
final_path_segment = os.path.dirname(path_after_docs)
else:
# Otherwise, use the file name without extension
Expand Down
16 changes: 8 additions & 8 deletions contributing/samples/adk_documentation/adk_docs_updater/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@
),
instruction=f"""
# 1. Identity
You are a helper bot that updates ADK docs in Github Repository {DOC_OWNER}/{DOC_REPO}
based on the code in the ADK Python codebase in Github Repository {CODE_OWNER}/{CODE_REPO} according to the instructions in the ADK docs issues.
You are a helper bot that updates ADK docs in GitHub Repository {DOC_OWNER}/{DOC_REPO}
based on the code in the ADK Python codebase in GitHub Repository {CODE_OWNER}/{CODE_REPO} according to the instructions in the ADK docs issues.

You are very familiar with Github, expecially how to search for files in a Github repository using git grep.
You are very familiar with GitHub, especially how to search for files in a GitHub repository using git grep.

# 2. Responsibilities
Your core responsibility includes:
Expand All @@ -69,18 +69,18 @@
# 3. Workflow
1. Always call the `clone_or_pull_repo` tool to make sure the ADK docs and codebase repos exist in the local folder {LOCAL_REPOS_DIR_PATH}/repo_name and are the latest version.
2. Read and analyze the issue specified by user.
- If user only specified the issue number, call the `get_issue` tool to get the issue details, otherwise use the issue details provided by user directly.
- If user only specified the issue number, call the `get_issue` tool to get the issue details; otherwise, use the issue details provided by user directly.
3. If the issue contains instructions about how to update the ADK docs, follow the instructions to update the ADK docs.
4. Understand the doc update instructions.
- Ignore and skip the instructions about updating API reference docs, since it will be automatically generated by the ADK team.
5. Read the doc to update using the `read_local_git_repo_file_content` tool from the local ADK docs repo under {LOCAL_REPOS_DIR_PATH}/{DOC_REPO}.
6. Find the related Python files in the ADK Python codebase.
- If the doc update instructions specify paths to the Python files, use them directly, otherwise use a list of regex search patterns to find the related Python files through the `search_local_git_repo` tool.
- If the doc update instructions specify paths to the Python files, use them directly; otherwise, use a list of regex search patterns to find the related Python files through the `search_local_git_repo` tool.
- You should focus on the main ADK Python codebase, ignore the changes in tests or other auxiliary files.
- You should find all the related Python files, not only the most relevant one.
7. Read the specified or found Python files using the `read_local_git_repo_file_content` tool to find all the related code.
- You can ignore unit test files, unless you are sure that the test code is uesful to understand the related concepts.
- You should read all the the found files to find all the related code, unless you already know the content of the file or you are sure that the file is not related to the ADK doc.
- You can ignore unit test files, unless you are sure that the test code is useful to understand the related concepts.
- You should read all the found files to find all the related code, unless you already know the content of the file or you are sure that the file is not related to the ADK doc.
8. Update the ADK doc file according to the doc update instructions and the related code.
- Use active voice phrasing in your doc updates.
- Use second person "you" form of address in your doc updates.
Expand All @@ -102,7 +102,7 @@
- **File Paths:** Always use absolute paths when calling the tools to read files, list directories, or search the codebase.
- **Tool Call Parallelism:** Execute multiple independent tool calls in parallel when feasible (i.e. searching the codebase).
- **Avoid deletion:** Do not delete any existing content unless specifically directed to do so.
- **Explaination:** Provide concise explanations for your actions and reasoning for each step.
- **Explanation:** Provide concise explanations for your actions and reasoning for each step.
- **Minimize changes:** When making updates to documentation pages, make the minimum amount of changes to achieve the communication goal. Only make changes that are necessary, and leave everything else as-is.
- **Avoid trivial code sample changes:** Update code samples only when adding or modifying functionality. Do not reformat code samples, change variable names, or change code syntax unless you are specifically directed to make those updates.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,17 @@
),
instruction=f"""
# 1. Identity
You are a helper bot that checks if ADK docs in Github Repository {DOC_REPO} owned by {DOC_OWNER}
should be updated based on the changes in the ADK Python codebase in Github Repository {CODE_REPO} owned by {CODE_OWNER}.
You are a helper bot that checks if ADK docs in GitHub Repository {DOC_REPO} owned by {DOC_OWNER}
should be updated based on the changes in the ADK Python codebase in GitHub Repository {CODE_REPO} owned by {CODE_OWNER}.

You are very familiar with Github, expecially how to search for files in a Github repository using git grep.
You are very familiar with GitHub, especially how to search for files in a GitHub repository using git grep.

# 2. Responsibilities
Your core responsibility includes:
- Find all the code changes between the two ADK releases.
- Find **all** the related docs files in ADK Docs repository under the "/docs/" directory.
- Compare the code changes with the docs files and analyze the differences.
- Write the instructions about how to update the ADK docs in markdown format and create a Github issue in the Github Repository {DOC_REPO} with the instructions.
- Write the instructions about how to update the ADK docs in markdown format and create a GitHub issue in the GitHub Repository {DOC_REPO} with the instructions.

# 3. Workflow
1. Always call the `clone_or_pull_repo` tool to make sure the ADK docs and codebase repos exist in the local folder {LOCAL_REPOS_DIR_PATH}/repo_name and are the latest version.
Expand Down Expand Up @@ -102,8 +102,8 @@
**Reference**:
Reference to the code file (e.g. src/google/adk/tools/spanner/metadata_tool.py).
```
- When referncing doc file, use the full relative path of the doc file in the ADK Docs repository (e.g. docs/sessions/memory.md).
9. Create or recommend to create a Github issue in the Github Repository {DOC_REPO} with the instructions using the `create_issue` tool.
- When referencing doc file, use the full relative path of the doc file in the ADK Docs repository (e.g. docs/sessions/memory.md).
9. Create or recommend to create a GitHub issue in the GitHub Repository {DOC_REPO} with the instructions using the `create_issue` tool.
- The title of the issue should be "Found docs updates needed from ADK python release <start_tag> to <end_tag>", where start_tag and end_tag are the release tags.
- The body of the issue should be the instructions about how to update the ADK docs.
- Include the compare link between the two ADK releases in the issue body, e.g. https://github.com/google/adk-python/compare/v1.14.0...v1.14.1.
Expand All @@ -112,7 +112,7 @@
# 4. Guidelines & Rules
- **File Paths:** Always use absolute paths when calling the tools to read files, list directories, or search the codebase.
- **Tool Call Parallelism:** Execute multiple independent tool calls in parallel when feasible (i.e. searching the codebase).
- **Explaination:** Provide concise explanations for your actions and reasoning for each step.
- **Explanation:** Provide concise explanations for your actions and reasoning for each step.
- **Reference:** For each recommended change, reference the code changes (i.e. links to the commits) **AND** the code files (i.e. relative paths to the code files in the codebase).
- **Sorting:** Sort the recommended changes by the importance of the changes, from the most important to the least important.
- Here are the importance groups: Feature changes > Bug fixes > Other changes.
Expand Down
2 changes: 1 addition & 1 deletion contributing/samples/adk_documentation/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ def get_issue(
Args:
repo_owner: The name of the repository owner.
repo_name: The name of the repository.
issue_number: issue number of the Github issue.
issue_number: issue number of the GitHub issue.

Returns:
The status of this request, with the issue details when successful.
Expand Down
4 changes: 2 additions & 2 deletions contributing/samples/adk_issue_formatting_agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
BUG_REPORT_TEMPLATE = read_file(
Path(__file__).parent / "../../../../.github/ISSUE_TEMPLATE/bug_report.md"
)
FREATURE_REQUEST_TEMPLATE = read_file(
FEATURE_REQUEST_TEMPLATE = read_file(
Path(__file__).parent
/ "../../../../.github/ISSUE_TEMPLATE/feature_request.md"
)
Expand Down Expand Up @@ -145,7 +145,7 @@ def list_comments_on_issue(issue_number: int) -> dict[str, any]:
# 2. CONTEXT & RESOURCES
* **Repository:** You are operating on the GitHub repository `{OWNER}/{REPO}`.
* **Bug Report Template:** (`{BUG_REPORT_TEMPLATE}`)
* **Feature Request Template:** (`{FREATURE_REQUEST_TEMPLATE}`)
* **Feature Request Template:** (`{FEATURE_REQUEST_TEMPLATE}`)

# 3. CORE MISSION
Your goal is to check if a GitHub issue, identified as either a "bug" or a "feature request,"
Expand Down
2 changes: 1 addition & 1 deletion contributing/samples/adk_pr_triaging_agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ def add_comment_to_pr(pr_number: int, comment: str) -> dict[str, Any]:
- If it's about tracing, label it with "tracing".
- If it's agent orchestration, agent definition, label it with "core".
- If it's about Model Context Protocol (e.g. MCP tool, MCP toolset, MCP session management etc.), label it with "mcp".
- If you can't find a appropriate labels for the PR, follow the previous instruction that starts with "IMPORTANT:".
- If you can't find an appropriate labels for the PR, follow the previous instruction that starts with "IMPORTANT:".

Here is the contribution guidelines:
`{CONTRIBUTING_MD}`
Expand Down
2 changes: 1 addition & 1 deletion contributing/samples/adk_triaging_agent/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ def change_issue_type(issue_number: int, issue_type: str) -> dict[str, Any]:
- Use "agent engine" only when the issue clearly references Vertex AI Agent Engine deployment artifacts (for example `.agent_engine_config.json`, `ae_ignore`, `agent_engine_id`, or Agent Engine sandbox errors).
- If it's about Model Context Protocol (e.g. MCP tool, MCP toolset, MCP session management etc.), label it with both "mcp" and "tools".
- If it's about A2A integrations or workflows, label it with "a2a".
- If you can't find a appropriate labels for the issue, follow the previous instruction that starts with "IMPORTANT:".
- If you can't find an appropriate labels for the issue, follow the previous instruction that starts with "IMPORTANT:".

Call the `add_label_and_owner_to_issue` tool to label the issue, which will also assign the issue to the owner of the label.

Expand Down
2 changes: 1 addition & 1 deletion contributing/samples/agent_engine_code_execution/README
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This sample data science agent uses Agent Engine Code Execution Sandbox to execu

* 1. Follow https://cloud.google.com/vertex-ai/generative-ai/docs/agent-engine/code-execution/overview to create a code execution sandbox environment.

* 2. Replace the SANDBOX_RESOURCE_NAME with the one you just created. If you dont want to create a new sandbox environment directly, the Agent Engine Code Execution Sandbox will create one for you by default using the AGENT_ENGINE_RESOURCE_NAME you specified, however, please ensure to clean up sandboxes after use, otherwise, it will consume quotas.
* 2. Replace the SANDBOX_RESOURCE_NAME with the one you just created. If you dont want to create a new sandbox environment directly, the Agent Engine Code Execution Sandbox will create one for you by default using the AGENT_ENGINE_RESOURCE_NAME you specified, however, please ensure to clean up sandboxes after use; otherwise, it will consume quotas.


## Sample prompt
Expand Down
2 changes: 1 addition & 1 deletion contributing/samples/agent_engine_code_execution/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ def base_system_instruction():
**Statefulness:** All code snippets are executed and the variables stays in the environment. You NEVER need to re-initialize variables. You NEVER need to reload files. You NEVER need to re-import libraries.

**Output Visibility:** Always print the output of code execution to visualize results, especially for data exploration and analysis. For example:
- To look a the shape of a pandas.DataFrame do:
- To look at the shape of a pandas.DataFrame do:
```tool_code
print(df.shape)
```
Expand Down
2 changes: 1 addition & 1 deletion contributing/samples/authn-adk-all-in-one/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ This folder comes with -

### Details

You can read about the Auth Code grant / flow type in detail [here](https://developer.okta.com/blog/2018/04/10/oauth-authorization-code-grant-type). But for the purpose of this demo, following steps take place
You can read about the [Auth Code grant / flow type](https://developer.okta.com/blog/2018/04/10/oauth-authorization-code-grant-type) in detail. But for the purpose of this demo, following steps take place

1. The user asks the agent to find hotels in "New York".
2. Agent realizes (based on LLM response) that it needs to call a tool and that the tool needs authentication.
Expand Down
4 changes: 2 additions & 2 deletions contributing/samples/authn-adk-all-in-one/idp/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def create_access_token(client_id, scopes, user_sub=None):
payload = {
"iss": "http://localhost:5000", # who issued this token?
# aud - What client API is this token for? - please check comment in hotel booker is_token_valid
# ideally the reqeust's resource parameter (part of OAuth spec extension)
# ideally the request's resource parameter (part of OAuth spec extension)
# Here is an example of such request inbound to this IDP
# GET http://localhost:5000/authorize?
# response_type=code&
Expand Down Expand Up @@ -344,7 +344,7 @@ def generate_token():
client = CLIENT_REGISTRY.get(client_id)

if not client:
logging.error(f"invlid client {client_id}")
logging.error(f"invalid client {client_id}")
return (
jsonify(
{"error": "invalid_client", "error_description": "Client not found"}
Expand Down
2 changes: 1 addition & 1 deletion contributing/samples/bigtable/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
tool_settings = BigtableToolSettings()

if CREDENTIALS_TYPE == AuthCredentialTypes.OAUTH2:
# Initiaze the tools to do interactive OAuth
# Initialize the tools to do interactive OAuth
# The environment variables OAUTH_CLIENT_ID and OAUTH_CLIENT_SECRET
# must be set
credentials_config = BigtableCredentialsConfig(
Expand Down
2 changes: 1 addition & 1 deletion contributing/samples/computer_use/playwright.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@


class PlaywrightComputer(BaseComputer):
"""Conputer that controls Chromium via Playwright."""
"""Computer that controls Chromium via Playwright."""

def __init__(
self,
Expand Down
2 changes: 1 addition & 1 deletion contributing/samples/core_basic_config/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Basic Confg-based Agent
# Basic Config-based Agent

This sample only covers:

Expand Down
2 changes: 1 addition & 1 deletion contributing/samples/core_custom_agent_config/my_agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class MyCustomAgentConfig(BaseAgentConfig):
model_config = ConfigDict(
extra="forbid",
)
agent_class: str = "core_cutom_agent_config.my_agents.MyCustomAgent"
agent_class: str = "core_custom_agent_config.my_agents.MyCustomAgent"
my_field: str = ""


Expand Down
4 changes: 2 additions & 2 deletions contributing/samples/custom_code_execution/agent.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def base_system_instruction():
```

**Output Visibility:** Always print the output of code execution to visualize results, especially for data exploration and analysis. For example:
- To look a the shape of a pandas.DataFrame do:
- To look at the shape of a pandas.DataFrame do:
```tool_code
print(df.shape)
```
Expand Down Expand Up @@ -150,7 +150,7 @@ def base_system_instruction():


You need to assist the user with their queries by looking at the data and the context in the conversation.
You final answer should summarize the code and code execution relavant to the user query.
You final answer should summarize the code and code execution relevant to the user query.

You should include all pieces of data to answer the user query, such as the table from code execution results.
If you cannot answer the question directly, you should follow the guidelines above to generate the next step.
Expand Down
2 changes: 1 addition & 1 deletion contributing/samples/gepa/adk_agent_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
class _TestPlugin(base_plugin.BasePlugin):

def __init__(self, outputs):
super().__init__(name="test-pluggin")
super().__init__(name="test-plugin")
self._model_output_idx = 0
self.got_llm_requests = []
self._outputs = outputs
Expand Down
2 changes: 1 addition & 1 deletion contributing/samples/hello_world_apigeellm/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Here are some examples of how to configure the model string in `agent.py` to ach

- `model="apigee/gemini-2.5-flash"`
- Uses the default API version.
- Provider is Vertex AI if `GOOGLE_GENAI_USE_VERTEXAI` is true, otherwise Gemini.
- Provider is Vertex AI if `GOOGLE_GENAI_USE_VERTEXAI` is true; otherwise, Gemini.

- `model="apigee/v1/gemini-2.5-flash"`
- Uses API version `v1`.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Langchain Youtube Search Agent
# Langchain YouTube Search Agent

This agent utilize the Langchain YoutubeSearchTool to search youtubes.
You need to install below dependencies:
Expand Down
8 changes: 4 additions & 4 deletions contributing/samples/live_agent_api_server_example/readme.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# What's this?

This is a sample that shows how to start the ADK api server, and how to connect
your agents in a live(bidi-stremaing) way. It works text and audio input, and
your agents in a live(bidi-streaming) way. It works text and audio input, and
the response is always audio.

## Prerequisite
Expand All @@ -14,10 +14,10 @@ the response is always audio.
may feed back to the model. You can use headset to avoid this or tune down
voice volume, or implement your own noise cancellation logic.
- Please ensure you grant the right mic/sound device permission to the terminal
that runs the script. Sometimes, terminal inside VSCode etc dones't really work
that runs the script. Sometimes, terminal inside VSCode etc doesn't really work
well. So try native terminals if you have permission issue.
- start api server first for your agent folder. For example, my anents are
locoated in contributing/samples. So I will run
- start api server first for your agent folder. For example, my agents are
located in contributing/samples. So I will run
`adk api_server contributing/samples/`. Keep this running.
- then in a separate window, run `python3 live_agent_example.py`

Expand Down
Loading