AS AgentScopeAPI 手册 / API Reference

ReviewerAgentFactory

public final class ReviewerAgentFactory
源码Source io/agentscope/harness/coding/agent/ReviewerAgentFactory.java:35–85

Reviewer 智能体工厂,承载智能体的部署、调度与服务化运行。位于 io.agentscope.harness.coding.agent 包。核心成员包括 create。

Factory for the reviewer agent.

  • Uses the reviewer system prompt with PR context

  • Only receives reviewer-specific tools (add_finding, update_finding, list_findings, publish_review, github_api_request, fetch_url, execute — no write/commit tools)

  • Runs in its own workspace, separate from the coding agent

方法摘要Method Summary

方法Method说明Description
public static HarnessAgent create(Path workspace, Toolkit reviewerToolkit)
static
创建并返回实例。
Builds a reviewer agent for the given workspace with default settings.
public static HarnessAgent create(Path workspace, Toolkit reviewerToolkit, String repoOwner, String repoName, int prNumber)
static
创建并返回实例。
Builds a reviewer agent with PR context baked into the system prompt.

方法详情Method Detail

create

public static HarnessAgent create(Path workspace, Toolkit reviewerToolkit)
static

创建并返回实例。

Builds a reviewer agent for the given workspace with default settings.

参数Parameters
名称Name类型Type说明Description
workspacePath工作区(类型 `Path`)。The workspace.
reviewerToolkitToolkitreviewer 工具包(类型 `Toolkit`)。The reviewer toolkit.
返回Returns HarnessAgent
返回HarnessAgent。Returns harness agent.
源码Source io/agentscope/harness/coding/agent/ReviewerAgentFactory.java:40–42

create

public static HarnessAgent create(Path workspace, Toolkit reviewerToolkit, String repoOwner, String repoName, int prNumber)
static

创建并返回实例。

Builds a reviewer agent with PR context baked into the system prompt.

参数Parameters
名称Name类型Type说明Description
workspacePath工作区(类型 `Path`)。reviewer agent workspace directory
reviewerToolkitToolkitreviewer 工具包(类型 `Toolkit`)。reviewer-specific tools only
repoOwnerString仓库所有者(类型 `String`)。GitHub repo owner
repoNameString仓库名称(类型 `String`)。GitHub repo name
prNumberintpr 数量(类型 `int`)。PR number
返回Returns HarnessAgent
返回HarnessAgent。Returns harness agent.
源码Source io/agentscope/harness/coding/agent/ReviewerAgentFactory.java:53–72
基于官方固定版本源码静态生成Generated from pinned official sources · Python 2.0.11 · Java 2.0.4
签名与文档为静态抽取;如有疑问请以源码为准。Signatures and docs are extracted statically; verify against the source when in doubt.