软件Bug助手-谷歌ADK代理
概述
Software Bug Assistant是一个示例代理,旨在帮助IT支持和软件开发人员对软件问题进行分类、管理和解决。此示例代理使用ADK Python、PostgreSQL错误票数据库(内部票)、GitHub MCP服务器(外部票)、RAG、Google搜索和StackOverflow来协助调试。
Youtube演示:https://youtu.be/M9-Mi1apJ5E

此README包含本地和Google Cloud部署的说明。
代理详细信息
软件Bug助手代理的主要功能包括:
| 特性 | 描述 |
|---|---|
| 交互类型 | 会话 |
| 复杂性 | 中级 |
| 代理类型 | 单一代理 |
| 组件 | 工具、数据库、RAG、谷歌搜索、GitHub MCP |
| 垂直 | 横向/IT支持 |
代理体系结构
主要特点
- 检索增强生成(RAG): 利用Cloud SQL的内置功能 顶点AI ML集成 获取相关/重复的软件错误。
- MCP数据库工具箱: MCP数据库工具箱 为我们的代理提供特定于数据库的工具。
- GitHub MCP服务器: 连接到
获取外部软件错误(开放问题、拉取请求等)。
- 谷歌搜索: 利用谷歌搜索作为内置工具来获取
相关搜索结果,以便将代理的响应与外部信息联系起来 最新知识。
🎥 演示和演练
请参阅 详细视频记录 了解生产级演示场景的逐步演练,包括:
- 诊断烧瓶
TypeError - 使用谷歌搜索和StackOverflow工具
- 提供带有解释的代码修复
设置和安装
先决条件
安装
- 克隆存储库:
git clone https://github.com/google/adk-samples.git
cd adk-samples/python/agents/software-bug-assistant- 配置环境变量(通过
.env文件):
GitHub个人访问令牌(PAT)
要使用GitHub MCP服务器进行身份验证,您需要一个GitHub个人访问令牌。
- 转到您的GitHub 开发人员设置.
- 点击“个人访问令牌”->“令牌(经典)”。
- 点击“生成新令牌”->“生成新的令牌(经典)”。
- 给你的代币起一个描述性的名字。
- 为您的令牌设置到期日期。
- 重要提示:为了安全起见,请授予您的令牌所需的最有限范围。对于存储库的只读访问
repo:status,public_repo,以及read:user范围通常就足够了。除非绝对必要,否则避免授予完整的仓库或管理员权限。 - 点击“生成令牌”。
- 复制生成的令牌。
Gemini API身份验证
使用Gemini模型进行身份验证有两种不同的方法:
- 使用通过Google AI Studio创建的API密钥直接调用Gemini API。
- 通过Google Cloud上的Vertex AI API调用Gemini模型。
\[!提示\] 如果您只想在本地运行示例,那么Google AI Studio的API密钥是最快的入门方法。 如果您计划部署到Cloud Run,则可能需要使用Vertex AI。
Gemini API Key
从Google AI Studio获取API密钥:https://aistudio.google.com/apikey
创建一个 .env 通过运行以下命令(替换 ` 使用API密钥和 ` 使用您的GitHub个人访问令牌):
echo "GOOGLE_API_KEY=" >> .env \
&& echo "GOOGLE_GENAI_USE_VERTEXAI=FALSE" >> .env \
&& echo "GITHUB_PERSONAL_ACCESS_TOKEN=" >> .envVertex AI
要使用Vertex AI,您需要 创建Google Cloud项目 和 启用顶点AI.
验证并启用Vertex AI API:
gcloud auth login
# Replace with your project ID
gcloud config set project
gcloud services enable aiplatform.googleapis.com创建一个 .env 通过运行以下命令(替换 ` 使用您的项目ID和 ` 使用您的GitHub个人访问令牌):
echo "GOOGLE_GENAI_USE_VERTEXAI=TRUE" >> .env \
&& echo "GOOGLE_CLOUD_PROJECT=" >> .env \
&& echo "GOOGLE_CLOUD_LOCATION=us-central1" >> .env \
&& echo "GITHUB_PERSONAL_ACCESS_TOKEN=" >> .env有一个例子 .env 文件位于 .env.示例 如果你愿意 验证您的 .env 设置正确。
来源 .env 将文件放入您的环境中:
set -o allexport && source .env && set +o allexport- 下载 MCP数据库工具箱
export OS="linux/amd64" # one of linux/amd64, darwin/arm64, darwin/amd64, or windows/amd64
curl -O --output-dir deployment/mcp-toolbox https://storage.googleapis.com/genai-toolbox/v0.6.0/$OS/toolbox
chmod +x deployment/mcp-toolbox/toolbox跳到:
💻 在本地运行
开始之前
安装PostgreSQL:
1-启动本地PostgreSQL实例。
例如,在MacOS上:
brew services start postgresql2-初始化数据库。
psql -U postgres然后,初始化数据库并 tickets 表:
CREATE DATABASE ticketsdb;
\c ticketsdb;
CREATE TABLE tickets (
ticket_id SERIAL PRIMARY KEY, -- PostgreSQL's auto-incrementing integer type (SERIAL is equivalent to INT AUTO_INCREMENT)
title VARCHAR(255) NOT NULL, -- A concise summary or title of the bug/issue.
description TEXT, -- A detailed description of the bug.
assignee VARCHAR(100), -- The name or email of the person/team assigned to the ticket.
priority VARCHAR(50), -- The priority level (e.g., 'P0 - Critical', 'P1 - High').
status VARCHAR(50) DEFAULT 'Open', -- The current status of the ticket (e.g., 'Open', 'In Progress', 'Resolved'). Default is 'Open'.
creation_time TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP, -- Timestamp when the ticket was first created. 'WITH TIME ZONE' is recommended for clarity and compatibility.
updated_time TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP -- Timestamp when the ticket was last updated. Will be managed by a trigger.
);插入一些示例数据:
INSERT INTO tickets (title, description, assignee, priority, status) VALUES
('Login Page Freezes After Multiple Failed Attempts', 'Users are reporting that after 3 failed login attempts, the login page becomes unresponsive and requires a refresh. No specific error message is displayed.', 'samuel.green@example.com', 'P0 - Critical', 'Open');
INSERT INTO tickets (title, description, assignee, priority, status) VALUES
('Dashboard Sales Widget Intermittent Data Loading Failure', 'The "Sales Overview" widget on the main dashboard intermittently shows a loading spinner but no data. Primarily affects Chrome browser users.', 'maria.rodriguez@example.com', 'P1 - High', 'In Progress');
INSERT INTO tickets (title, description, assignee, priority, status) VALUES
('Broken Link in Footer - Privacy Policy', 'The "Privacy Policy" hyperlink located in the website footer leads to a 404 "Page Not Found" error.', 'maria.rodriguez@example.com', 'P3 - Low', 'Resolved');
INSERT INTO tickets (title, description, assignee, priority, status) VALUES
('UI Misalignment on Mobile Landscape View (iOS)', 'On specific iOS devices (e.g., iPhone 14 models), the top navigation bar shifts downwards when the device is viewed in landscape orientation, obscuring content.', 'maria.rodriguez@example.com', 'P2 - Medium', 'In Progress');
INSERT INTO tickets (title, description, assignee, priority, status) VALUES
('Critical XZ Utils Backdoor Detected in Core Dependency (CVE-2024-3094)', 'Urgent: A sophisticated supply chain compromise (CVE-2024-3094) has been identified in XZ Utils versions 5.6.0 and 5.6.1. This malicious code potentially allows unauthorized remote SSH access by modifying liblzma. Immediate investigation and action required for affected Linux/Unix systems and services relying on XZ Utils.', 'frank.white@example.com', 'P0 - Critical', 'Open');
INSERT INTO tickets (title, description, assignee, priority, status) VALUES
('Database Connection Timeouts During Peak Usage', 'The application is experiencing frequent database connection timeouts, particularly during peak hours (10 AM - 12 PM EDT), affecting all users and causing service interruptions.', 'frank.white@example.com', 'P1 - High', 'Open');
INSERT INTO tickets (title, description, assignee, priority, status) VALUES
('Export to PDF Truncates Long Text Fields in Reports', 'When generating PDF exports of reports containing extensive text fields, the text is abruptly cut off at the end of the page instead of wrapping or continuing to the next page.', 'samuel.green@example.com', 'P1 - High', 'Open');
INSERT INTO tickets (title, description, assignee, priority, status) VALUES
('Search Filter "Date Range" Not Applying Correctly', 'The "Date Range" filter on the search results page does not filter records accurately; results outside the specified date range are still displayed.', 'samuel.green@example.com', 'P2 - Medium', 'Resolved');
INSERT INTO tickets (title, description, assignee, priority, status) VALUES
('Typo in Error Message: "Unathorized Access"', 'The error message displayed when a user attempts an unauthorized action reads "Unathorized Access" instead of "Unauthorized Access."', 'maria.rodriguez@example.com', 'P3 - Low', 'Resolved');
INSERT INTO tickets (title, description, assignee, priority, status) VALUES
('Intermittent File Upload Failures for Large Files', 'Users are intermittently reporting that file uploads fail without a clear error message or explanation, especially for files exceeding 10MB in size.', 'frank.white@example.com', 'P1 - High', 'Open');3-运行数据库服务器的MCP工具箱。
第一, 下载MCP工具箱 二进制文件(如果尚未安装)。
然后,打开 deployment/mcp-toolbox/tools.yaml 文件。这是MCP工具箱的预构建配置,它针对 tickets 我们刚刚创建的表,包括通过其ID获取票证、创建新票证或搜索票证。
\[!注意\] 矢量搜索通过 search-tickets 尚未启用本地开发-请参阅下面的Google Cloud设置。重要提示: 更新第一行 tools.yaml 指向您本地的Postgres实例,例如:
postgresql:
kind: postgres
host: 127.0.0.1
port: 5432
database: tickets-db
user: ${DB_USER}
password: ${DB_PASS}现在,您可以在本地运行工具箱服务器:
cd deployment/mcp-toolbox/
./toolbox --tools-file="tools.yaml"您应该看到类似于以下输出的内容:
2025-05-30T02:06:57.479344419Z INFO "Initialized 1 sources."
2025-05-30T02:06:57.479696869Z INFO "Initialized 0 authServices."
2025-05-30T02:06:57.479973769Z INFO "Initialized 9 tools."
2025-05-30T02:06:57.480054519Z INFO "Initialized 2 toolsets."
2025-05-30T02:06:57.480739499Z INFO "Server ready to serve!" 您可以通过打开来验证服务器是否正在运行http://localhost:5000/api/toolset在您的浏览器中。 您应该看到一个JSON响应,其中包含中指定的工具列表 tools.yaml.
{
"serverVersion": "0.6.0+binary.linux.amd64.0.5.0.9a5d76e2dc66eaf0d2d0acf9f202a17539879ffe",
"tools": {
"create-new-ticket": {
"description": "Create a new software ticket.",
"parameters": [
{
"name": "title",
"type": "string",
"description": "The title of the new ticket.",
"authSources": []
},
// ...
],
}
}
}4-在本地运行代理
现在我们已经准备好运行ADK Python代理了!
默认情况下,代理配置为与本地MCP Toolbox服务器通信 http://127.0.0.1:5000,所以 保持工具箱服务器运行.
您可以使用以下命令运行代理 adk 命令a 新 终端。
- 通过CLI(
adk run):
uv run adk run software_bug_assistant- 通过web界面(
adk web):
uv run adk web命令 adk web将在您的计算机上启动一个web服务器并打印 URL。您可以打开URL,在左上角的下拉菜单中选择“software_bug_assistant”,右侧将出现聊天机器人界面。对话最初是空白的。
以下是您可以向代理提出的一些示例请求:
- “你能列出所有未解决的内部票证问题吗?”
- “您能将票ID 7的优先级提升到P0吗?”
- “StackOverflow上有关于CVE-2024-3094的讨论吗?”
- “你能列出psf/requests GitHub存储库上最新的5个未决问题吗?”

______________________________________________________________________
☁️ 部署到 Google Cloud
这些说明介绍了将软件Bug Assistant代理部署到Google Cloud的过程,包括Cloud Run和Cloud SQL(PostgreSQL)。此设置还使用 google_ml集成 Cloud SQL的矢量插件,以及 text-embeddings-005 Vertex AI的模型。

开始之前
部署到Google Cloud需要:
1-对Google Cloud CLI进行身份验证,并启用Google Cloud API。
gcloud auth login
gcloud auth application-default login
export PROJECT_ID=""
gcloud config set project $PROJECT_ID
gcloud services enable sqladmin.googleapis.com \
compute.googleapis.com \
cloudresourcemanager.googleapis.com \
servicenetworking.googleapis.com \
aiplatform.googleapis.com2-创建一个Cloud SQL(Postgres)实例。
gcloud sql instances create software-assistant \
--database-version=POSTGRES_16 \
--tier=db-custom-1-3840 \
--region=us-central1 \
--edition=ENTERPRISE \
--enable-google-ml-integration \
--database-flags cloudsql.enable_google_ml_integration=on \
--root-password=admin创建后,您可以在云控制台中查看您的实例 这里.
3-创建SQL数据库,并授予Cloud SQL服务帐户对Vertex AI的访问权限。
此步骤对于创建向量嵌入(Agent RAG搜索)是必要的。
gcloud sql databases create tickets-db --instance=software-assistant
SERVICE_ACCOUNT_EMAIL=$(gcloud sql instances describe software-assistant --format="value(serviceAccountEmailAddress)")
echo $SERVICE_ACCOUNT_EMAIL
gcloud projects add-iam-policy-binding $PROJECT_ID --member="serviceAccount:$SERVICE_ACCOUNT_EMAIL" --role="roles/aiplatform.user"4-设置 tickets 桌子。
从云控制台(Cloud SQL)打开 云SQL工作室.
登录 tickets-db 数据库使用 postgres 用户(密码: admin,但请注意,您可以在Cloud SQL>主实例>用户下更改为更安全的密码)。

打开一个新 编辑 然后,粘贴以下SQL代码以设置表并创建向量嵌入。
CREATE EXTENSION IF NOT EXISTS google_ml_integration CASCADE;
CREATE EXTENSION IF NOT EXISTS vector CASCADE;
GRANT EXECUTE ON FUNCTION embedding TO postgres;
CREATE TABLE tickets (
ticket_id SERIAL PRIMARY KEY, -- PostgreSQL's auto-incrementing integer type (SERIAL is equivalent to INT AUTO_INCREMENT)
title VARCHAR(255) NOT NULL, -- A concise summary or title of the bug/issue.
description TEXT, -- A detailed description of the bug.
assignee VARCHAR(100), -- The name or email of the person/team assigned to the ticket.
priority VARCHAR(50), -- The priority level (e.g., 'P0 - Critical', 'P1 - High').
status VARCHAR(50) DEFAULT 'Open', -- The current status of the ticket (e.g., 'Open', 'In Progress', 'Resolved'). Default is 'Open'.
creation_time TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP, -- Timestamp when the ticket was first created. 'WITH TIME ZONE' is recommended for clarity and compatibility.
updated_time TIMESTAMP WITH TIME ZONE DEFAULT CURRENT_TIMESTAMP -- Timestamp when the ticket was last updated. Will be managed by a trigger.
);5-加载样本数据。
从Cloud SQL Studio中,粘贴以下SQL代码以加载示例数据。
INSERT INTO tickets (title, description, assignee, priority, status) VALUES
('Login Page Freezes After Multiple Failed Attempts', 'Users are reporting that after 3 failed login attempts, the login page becomes unresponsive and requires a refresh. No specific error message is displayed.', 'samuel.green@example.com', 'P0 - Critical', 'Open');
INSERT INTO tickets (title, description, assignee, priority, status) VALUES
('Dashboard Sales Widget Intermittent Data Loading Failure', 'The "Sales Overview" widget on the main dashboard intermittently shows a loading spinner but no data. Primarily affects Chrome browser users.', 'maria.rodriguez@example.com', 'P1 - High', 'In Progress');
INSERT INTO tickets (title, description, assignee, priority, status) VALUES
('Broken Link in Footer - Privacy Policy', 'The "Privacy Policy" hyperlink located in the website footer leads to a 404 "Page Not Found" error.', 'maria.rodriguez@example.com', 'P3 - Low', 'Resolved');
INSERT INTO tickets (title, description, assignee, priority, status) VALUES
('UI Misalignment on Mobile Landscape View (iOS)', 'On specific iOS devices (e.g., iPhone 14 models), the top navigation bar shifts downwards when the device is viewed in landscape orientation, obscuring content.', 'maria.rodriguez@example.com', 'P2 - Medium', 'In Progress');
INSERT INTO tickets (title, description, assignee, priority, status) VALUES
('Critical XZ Utils Backdoor Detected in Core Dependency (CVE-2024-3094)', 'Urgent: A sophisticated supply chain compromise (CVE-2024-3094) has been identified in XZ Utils versions 5.6.0 and 5.6.1. This malicious code potentially allows unauthorized remote SSH access by modifying liblzma. Immediate investigation and action required for affected Linux/Unix systems and services relying on XZ Utils.', 'frank.white@example.com', 'P0 - Critical', 'Open');
INSERT INTO tickets (title, description, assignee, priority, status) VALUES
('Database Connection Timeouts During Peak Usage', 'The application is experiencing frequent database connection timeouts, particularly during peak hours (10 AM - 12 PM EDT), affecting all users and causing service interruptions.', 'frank.white@example.com', 'P1 - High', 'Open');
INSERT INTO tickets (title, description, assignee, priority, status) VALUES
('Export to PDF Truncates Long Text Fields in Reports', 'When generating PDF exports of reports containing extensive text fields, the text is abruptly cut off at the end of the page instead of wrapping or continuing to the next page.', 'samuel.green@example.com', 'P1 - High', 'Open');
INSERT INTO tickets (title, description, assignee, priority, status) VALUES
('Search Filter "Date Range" Not Applying Correctly', 'The "Date Range" filter on the search results page does not filter records accurately; results outside the specified date range are still displayed.', 'samuel.green@example.com', 'P2 - Medium', 'Resolved');
INSERT INTO tickets (title, description, assignee, priority, status) VALUES
('Typo in Error Message: "Unathorized Access"', 'The error message displayed when a user attempts an unauthorized action reads "Unathorized Access" instead of "Unauthorized Access."', 'maria.rodriguez@example.com', 'P3 - Low', 'Resolved');
INSERT INTO tickets (title, description, assignee, priority, status) VALUES
('Intermittent File Upload Failures for Large Files', 'Users are intermittently reporting that file uploads fail without a clear error message or explanation, especially for files exceeding 10MB in size.', 'frank.white@example.com', 'P1 - High', 'Open');6-创建触发器以更新 updated_time 记录更新时的字段。
CREATE OR REPLACE FUNCTION update_updated_time_tickets()
RETURNS TRIGGER AS $$
BEGIN
NEW.updated_time = NOW(); -- Set the updated_time to the current timestamp
RETURN NEW; -- Return the new row
END;
$$ language 'plpgsql';
CREATE TRIGGER update_tickets_updated_time
BEFORE UPDATE ON tickets
FOR EACH ROW -- This means the trigger fires for each row affected by the UPDATE statement
EXECUTE PROCEDURE update_updated_time_tickets();7-从以下内容创建向量嵌入 description 现场。
ALTER TABLE tickets ADD COLUMN embedding vector(768) GENERATED ALWAYS AS (embedding('text-embedding-005',description)) STORED;8-验证数据库是否已就绪。
从Cloud SQL studio运行:
SELECT * FROM tickets;您应该看到:
9-将数据库服务器的MCP工具箱部署到云端运行
现在我们有了一个Cloud SQL数据库,我们可以将MCP Toolbox for Databases服务器部署到Cloud Run,并将其指向我们的Cloud SQL实例。
首先,更新 deployment/mcp-toolbox/tools.yaml 对于您的Cloud SQL实例:
postgresql:
kind: cloud-sql-postgres
project: ${PROJECT_ID}
region: us-central1
instance: software-assistant
database: tickets-db
user: ${DB_USER}
password: ${DB_PASS}然后,配置Toolbox的Cloud Run服务帐户以访问Secret Manager和Cloud SQL。秘密经理是我们存放我们的 tools.yaml 文件,因为它包含敏感的Cloud SQL凭据。
注意-从顶层运行此命令 software-bug-assistant/ 目录。
gcloud services enable run.googleapis.com \
cloudbuild.googleapis.com \
artifactregistry.googleapis.com \
iam.googleapis.com \
secretmanager.googleapis.com
gcloud iam service-accounts create toolbox-identity
gcloud projects add-iam-policy-binding $PROJECT_ID \
--member serviceAccount:toolbox-identity@$PROJECT_ID.iam.gserviceaccount.com \
--role roles/secretmanager.secretAccessor
gcloud projects add-iam-policy-binding $PROJECT_ID \
--member serviceAccount:toolbox-identity@$PROJECT_ID.iam.gserviceaccount.com \
--role roles/cloudsql.client
gcloud secrets create tools --data-file=deployment/mcp-toolbox/tools.yaml现在我们可以将工具箱部署到Cloud Run。我们将使用最新的 发布版本 MCP工具箱映像(我们不需要构建或部署 toolbox 从源头。)
gcloud run deploy toolbox \
--image us-central1-docker.pkg.dev/database-toolbox/toolbox/toolbox:latest \
--service-account toolbox-identity \
--region us-central1 \
--set-secrets "/app/tools.yaml=tools:latest" \
--set-env-vars="PROJECT_ID=$PROJECT_ID,DB_USER=postgres,DB_PASS=admin" \
--args="--tools-file=/app/tools.yaml","--address=0.0.0.0","--port=8080" \
--allow-unauthenticated通过获取云运行日志来验证工具箱是否正在运行:
gcloud run services logs read toolbox --region us-central1您应该看到:
2025-05-15 18:03:55 2025-05-15T18:03:55.465847801Z INFO "Initialized 1 sources."
2025-05-15 18:03:55 2025-05-15T18:03:55.466152914Z INFO "Initialized 0 authServices."
2025-05-15 18:03:55 2025-05-15T18:03:55.466374245Z INFO "Initialized 9 tools."
2025-05-15 18:03:55 2025-05-15T18:03:55.466477938Z INFO "Initialized 2 toolsets."
2025-05-15 18:03:55 2025-05-15T18:03:55.467492303Z INFO "Server ready to serve!"将工具箱服务的Cloud Run URL另存为环境变量。
export MCP_TOOLBOX_URL=$(gcloud run services describe toolbox --region us-central1 --format "value(status.url)")现在,我们已经准备好将ADK Python代理部署到Cloud Run!:火箭:
10-创建工件注册表存储库。
这是我们存储代理容器映像的地方。
gcloud artifacts repositories create adk-samples \
--repository-format=docker \
--location=us-central1 \
--description="Repository for ADK Python sample agents" \
--project=$PROJECT_ID11-将ADK Python代理容器化。
使用Cloud Build构建容器映像并将其推送到工件注册表。
gcloud builds submit --region=us-central1 --tag us-central1-docker.pkg.dev/$PROJECT_ID/adk-samples/software-bug-assistant:latest12-将代理部署到Cloud Run
\[!注意\] 如果您使用Vertex AI而不是AI Studio进行Gemini调用,则需要替换GOOGLE_API_KEY随着GOOGLE_CLOUD_PROJECT,GOOGLE_CLOUD_LOCATION,以及GOOGLE_GENAI_USE_VERTEXAI=TRUE在下面的最后一行gcloud run deploy命令。 ``bash --set-env-vars=GOOGLE_CLOUD_PROJECT=$PROJECT_ID,GOOGLE_CLOUD_LOCATION=us-central1,GOOGLE_GENAI_USE_VERTEXAI=TRUE,MCP_TOOLBOX_URL=$MCP_TOOLBOX_URL,GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_PERSONAL_ACCESS_TOKEN``
gcloud run deploy software-bug-assistant \
--image=us-central1-docker.pkg.dev/$PROJECT_ID/adk-samples/software-bug-assistant:latest \
--region=us-central1 \
--allow-unauthenticated \
--set-env-vars=GOOGLE_API_KEY=$GOOGLE_API_KEY,MCP_TOOLBOX_URL=$MCP_TOOLBOX_URL,GITHUB_PERSONAL_ACCESS_TOKEN=$GITHUB_PERSONAL_ACCESS_TOKEN 当此操作成功运行时,您应该看到:
Service [software-bug-assistant] revision [software-bug-assistant-00001-d4s] has been deployed and is serving 100 percent of traffic.13-测试云运行代理
打开上一步输出的云运行服务URL。
您应该看到软件Bug助手的ADK Web UI。
通过问以下问题来测试代理:
Any issues around database timeouts?How many bugs are assigned to samuel.green@example.com? Show a table.What are some possible root-causes for the unresponsive login page issue?(调用谷歌搜索工具)Get the bug ID for the unresponsive login page issues-->Boost that bug's priority to P0..Create a new bug.(让代理指导您创建bug)
*工作流程示例*:

替代方案:使用代理入门包
您还可以使用 代理入门包 要创建具有其他部署选项的此代理的生产就绪版本,请执行以下操作:
# Create and activate a virtual environment
python -m venv .venv && source .venv/bin/activate # On Windows: .venv\Scripts\activate
# Install the starter pack and create your project
pip install --upgrade agent-starter-pack
agent-starter-pack create my-software-bug-assistant -a adk@software-bug-assistant⚡️ Alternative: Using uv
如果你有 uv 安装后,您可以使用单个命令创建和设置项目:
uvx agent-starter-pack create my-software-bug-assistant -a adk@software-bug-assistant此命令处理创建项目,而无需将包预安装到虚拟环境中。
入门包将提示您选择部署选项,并提供其他生产就绪功能,包括自动CI/CD部署脚本。
清理
您可以通过以下方式清理此试剂样本:
