AS AgentScopeAPI 手册 / API Reference

CodingAgentApplication

@SpringBootApplication public class CodingAgentApplication
源码Source io/agentscope/harness/coding/CodingAgentApplication.java:62–146

Coding 智能体应用,承载智能体的部署、调度与服务化运行。位于 io.agentscope.harness.coding 包。核心成员包括 main、sqliteBaseStore、codingAgentMetrics、reviewerFindingsService、gitHubReviewPublisher、codingToolkit。

Spring Boot application entry point for the coding agent webhook service.

Assembles all components:

  • CodingBootstrap with dual agents (coding + reviewer)

  • SqliteBaseStore for thread metadata, queue, deliveries, findings

  • RunDispatcher for webhook → agent dispatch

  • GitHubWebhookHandler for incoming GitHub events

Run


mvn -pl agentscope-examples/agents/agentscope-codingagent -am spring-boot:run

方法摘要Method Summary

方法Method说明Description
public static void main(String[] args)
static
设置主。
Performs the main operation.
public SqliteBaseStore sqliteBaseStore() throws SQLException
返回 `sqliteBaseStore` 结果。
Returns the sqlite base store.
public CodingAgentMetrics codingAgentMetrics(MeterRegistry registry)
设置该参数。
Performs the coding agent metrics operation.
public ReviewerFindingsService reviewerFindingsService(SqliteBaseStore store, CodingAgentMetrics metrics)
执行 `reviewerFindingsService` 方法。
Performs the reviewer findings service operation.
public GitHubReviewPublisher gitHubReviewPublisher(CodingAgentMetrics metrics)
设置该参数。
Performs the git hub review publisher operation.
public Toolkit codingToolkit(ObjectProvider<RunDispatcher> dispatcherProvider)
设置该参数。
Performs the coding toolkit operation.
public Toolkit reviewerToolkit(ReviewerFindingsService findingsService, GitHubReviewPublisher publisher)
执行 `reviewerToolkit` 方法。
Performs the reviewer toolkit operation.
public CodingBootstrap codingBootstrap(Toolkit codingToolkit, Toolkit reviewerToolkit, SqliteBaseStore store) throws IOException
执行 `codingBootstrap` 方法。
Performs the coding bootstrap operation.
public RunDispatcher runDispatcher(CodingBootstrap bootstrap, SqliteBaseStore store, CodingAgentMetrics metrics)
运行调度器。
Runs the dispatcher.
public GitHubWebhookHandler gitHubWebhookHandler(RunDispatcher dispatcher, SqliteBaseStore store, CodingAgentMetrics metrics)
执行 `gitHubWebhookHandler` 方法。
Performs the git hub webhook handler operation.

方法详情Method Detail

main

public static void main(String[] args)
static

设置主。

Performs the main operation.

参数Parameters
名称Name类型Type说明Description
argsString[]参数(类型 `String[]`)。The args.
源码Source io/agentscope/harness/coding/CodingAgentApplication.java:65–67

sqliteBaseStore

public SqliteBaseStore sqliteBaseStore() throws SQLException

返回 sqliteBaseStore 结果。

Returns the sqlite base store.

返回Returns SqliteBaseStore
返回SqliteBaseStore。Returns sqlite base store.
抛出Throws
  • SQLException 可能抛出 `SQLException`。Thrown when the operation cannot be completed.
源码Source io/agentscope/harness/coding/CodingAgentApplication.java:69–74

codingAgentMetrics

public CodingAgentMetrics codingAgentMetrics(MeterRegistry registry)

设置该参数。

Performs the coding agent metrics operation.

参数Parameters
名称Name类型Type说明Description
registryMeterRegistry注册表(类型 `MeterRegistry`)。The registry.
返回Returns CodingAgentMetrics
返回CodingAgentMetrics。Returns coding agent metrics.
源码Source io/agentscope/harness/coding/CodingAgentApplication.java:76–79

reviewerFindingsService

public ReviewerFindingsService reviewerFindingsService(SqliteBaseStore store, CodingAgentMetrics metrics)

执行 reviewerFindingsService 方法。

Performs the reviewer findings service operation.

参数Parameters
名称Name类型Type说明Description
storeSqliteBaseStore存储实例(类型 `SqliteBaseStore`)。The store.
metricsCodingAgentMetrics指标(类型 `CodingAgentMetrics`)。The metrics.
返回Returns ReviewerFindingsService
返回ReviewerFindingsService。Returns reviewer findings service.
源码Source io/agentscope/harness/coding/CodingAgentApplication.java:81–85

gitHubReviewPublisher

public GitHubReviewPublisher gitHubReviewPublisher(CodingAgentMetrics metrics)

设置该参数。

Performs the git hub review publisher operation.

参数Parameters
名称Name类型Type说明Description
metricsCodingAgentMetrics指标(类型 `CodingAgentMetrics`)。The metrics.
返回Returns GitHubReviewPublisher
返回GitHubReviewPublisher。Returns github review publisher.
源码Source io/agentscope/harness/coding/CodingAgentApplication.java:87–90

codingToolkit

public Toolkit codingToolkit(ObjectProvider<RunDispatcher> dispatcherProvider)

设置该参数。

Performs the coding toolkit operation.

参数Parameters
名称Name类型Type说明Description
dispatcherProviderObjectProvider<RunDispatcher>调度器提供者(类型 `ObjectProvider`)。The dispatcher provider.
返回Returns Toolkit
返回工具包。Returns toolkit.
源码Source io/agentscope/harness/coding/CodingAgentApplication.java:92–109

reviewerToolkit

public Toolkit reviewerToolkit(ReviewerFindingsService findingsService, GitHubReviewPublisher publisher)

执行 reviewerToolkit 方法。

Performs the reviewer toolkit operation.

参数Parameters
名称Name类型Type说明Description
findingsServiceReviewerFindingsServicefindings 服务(类型 `ReviewerFindingsService`)。The findings service.
publisherGitHubReviewPublisherpublisher(类型 `GitHubReviewPublisher`)。The publisher.
返回Returns Toolkit
返回工具包。Returns toolkit.
源码Source io/agentscope/harness/coding/CodingAgentApplication.java:111–122

codingBootstrap

public CodingBootstrap codingBootstrap(Toolkit codingToolkit, Toolkit reviewerToolkit, SqliteBaseStore store) throws IOException

执行 codingBootstrap 方法。

Performs the coding bootstrap operation.

参数Parameters
名称Name类型Type说明Description
codingToolkitToolkitcoding 工具包(类型 `Toolkit`)。The coding toolkit.
reviewerToolkitToolkitreviewer 工具包(类型 `Toolkit`)。The reviewer toolkit.
storeSqliteBaseStore存储实例(类型 `SqliteBaseStore`)。The store.
返回Returns CodingBootstrap
返回CodingBootstrap。Returns coding bootstrap.
抛出Throws
  • IOException 可能抛出 `IOException`。Thrown when the operation cannot be completed.
源码Source io/agentscope/harness/coding/CodingAgentApplication.java:124–133

runDispatcher

public RunDispatcher runDispatcher(CodingBootstrap bootstrap, SqliteBaseStore store, CodingAgentMetrics metrics)

运行调度器。

Runs the dispatcher.

参数Parameters
名称Name类型Type说明Description
bootstrapCodingBootstrapbootstrap(类型 `CodingBootstrap`)。The bootstrap.
storeSqliteBaseStore存储实例(类型 `SqliteBaseStore`)。The store.
metricsCodingAgentMetrics指标(类型 `CodingAgentMetrics`)。The metrics.
返回Returns RunDispatcher
返回RunDispatcher。Returns run dispatcher.
源码Source io/agentscope/harness/coding/CodingAgentApplication.java:135–139

gitHubWebhookHandler

public GitHubWebhookHandler gitHubWebhookHandler(RunDispatcher dispatcher, SqliteBaseStore store, CodingAgentMetrics metrics)

执行 gitHubWebhookHandler 方法。

Performs the git hub webhook handler operation.

参数Parameters
名称Name类型Type说明Description
dispatcherRunDispatcher调度器(类型 `RunDispatcher`)。The dispatcher.
storeSqliteBaseStore存储实例(类型 `SqliteBaseStore`)。The store.
metricsCodingAgentMetrics指标(类型 `CodingAgentMetrics`)。The metrics.
返回Returns GitHubWebhookHandler
返回GitHubWebhookHandler。Returns github webhook handler.
源码Source io/agentscope/harness/coding/CodingAgentApplication.java:141–145
基于官方固定版本源码静态生成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.