AS AgentScopeAPI 手册 / API Reference

CodingSystemPrompt

public final class CodingSystemPrompt
源码Source io/agentscope/harness/coding/prompt/CodingSystemPrompt.java:37–444

Coding 系统提示词,承载智能体的部署、调度与服务化运行。位于 io.agentscope.harness.coding.prompt 包。核心成员包括 build。

Constructs the system prompt for the coding agent.

Mirrors agent/prompt.py from open-swe-main. The prompt is assembled from sections: working environment, task overview, repo setup, file management, task execution, tool usage, coding standards, core behavior, dependency, communication, and external untrusted comments.

Key differences from the Python version:

  • GitHub API access uses github_api_request tool (not GH_TOKEN=dummy gh)

  • linearCtx may be null (Linear integration deferred)

方法摘要Method Summary

方法Method说明Description
public static String build(String workingDir, String linearCtx)
static
构建并返回最终实例。
Builds the full system prompt for the coding agent.
public static String build(String workingDir, String linearCtx, Path defaultPromptOverride)
static
构建并返回最终实例。
Builds the full system prompt.

方法详情Method Detail

build

public static String build(String workingDir, String linearCtx)
static

构建并返回最终实例。

Builds the full system prompt for the coding agent.

参数Parameters
名称Name类型Type说明Description
workingDirStringworking 目录(类型 `String`)。The working dir.
linearCtxStringlinear Ctx(类型 `String`)。The linear ctx.
返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/coding/prompt/CodingSystemPrompt.java:42–44

build

public static String build(String workingDir, String linearCtx, Path defaultPromptOverride)
static

构建并返回最终实例。

Builds the full system prompt.

参数Parameters
名称Name类型Type说明Description
workingDirStringworking 目录(类型 `String`)。sandbox working directory
linearCtxStringlinear Ctx(类型 `String`)。optional Linear ticket context (may be null — Linear deferred)
defaultPromptOverridePath默认提示词 Override(类型 `Path`)。optional path to a `default_prompt.md` override file
返回Returns String
返回字符串结果。Returns a string.
源码Source io/agentscope/harness/coding/prompt/CodingSystemPrompt.java:53–75
基于官方固定版本源码静态生成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.