LocalHandsToolExecutor
public final class LocalHandsToolExecutor
源码Source
io/agentscope/builder/web/managed/selfhosted/LocalHandsToolExecutor.java:37–393本地 Hands 工具执行器,承载智能体的部署、调度与服务化运行。位于 io.agentscope.builder.web.managed.selfhosted 包。核心成员包括 workDir、execute、LocalHandsToolExecutor。
Executes the self-hosted hands toolset against a local workspace directory. Used by both the
standalone HandsWorkerMain and the in-process development worker.
嵌套类摘要Nested Class Summary
| 类Class | 类型Kind | 说明Description |
|---|---|---|
ToolExecResult | 记录record | 承载工具 Exec 结果数据的记录类型。 Result of a local hands tool execution. |
构造器摘要Constructor Summary
| 构造器Constructor | 说明Description |
|---|---|
public LocalHandsToolExecutor(Path workDir) | 初始化 `LocalHandsToolExecutor` 实例。 Creates a new instance. |
方法摘要Method Summary
| 方法Method | 说明Description |
|---|---|
public Path workDir() | 用于此会话的工作区根。 Workspace root for this session. |
public ToolExecResult execute(String name, Map<String, Object> input) | 执行执行相关操作。 Runs one tool call and returns a textual result suitable for `user.tool_result`
content. |
构造器详情Constructor Detail
LocalHandsToolExecutor
public LocalHandsToolExecutor(Path workDir)
初始化 LocalHandsToolExecutor 实例。
Creates a new instance.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
workDir | Path | work 目录(类型 `Path`)。The work dir. |
源码Source
io/agentscope/builder/web/managed/selfhosted/LocalHandsToolExecutor.java:46–48方法详情Method Detail
workDir
public Path workDir()
用于此会话的工作区根。
Workspace root for this session.
Path返回路径。Returns path.
源码Source
io/agentscope/builder/web/managed/selfhosted/LocalHandsToolExecutor.java:51–53execute
public ToolExecResult execute(String name, Map<String, Object> input)
执行执行相关操作。
Runs one tool call and returns a textual result suitable for user.tool_result content.
参数Parameters
| 名称Name | 类型Type | 说明Description |
|---|---|---|
name | String | 名称(类型 `String`)。The name. |
input | Map<String, Object> | 输入消息(类型 `Map`)。The input. |
ToolExecResult返回ToolExecResult。Returns tool exec result.
源码Source
io/agentscope/builder/web/managed/selfhosted/LocalHandsToolExecutor.java:59–76嵌套类详情Nested Class Detail
ToolExecResult
public record ToolExecResult(String content, boolean error)承载工具 Exec 结果数据的记录类型。位于 io.agentscope.builder.web.managed.selfhosted 包。核心成员包括 content、error。
Result of a local hands tool execution.