AS AgentScopeAPI 手册 / API Reference

ArtifactDeliveryTarget

@FunctionalInterface public interface ArtifactDeliveryTarget
源码Source io/agentscope/harness/agent/artifact/ArtifactDeliveryTarget.java:33–48

定义 Artifact Delivery 目标契约的接口。位于 io.agentscope.harness.agent.artifact 包。核心成员包括 deliver。

SPI for delivering artifacts produced by an agent (typically inside a sandbox) to a destination outside the agent filesystem — the host, a project artifact store, an object store, WebDAV, etc.

The framework stays business-agnostic: the generic deliver_artifact tool downloads the file bytes from the filesystem and delegates the actual transport to the configured ArtifactDeliveryTarget, which the application implements.

Configure on io.agentscope.harness.agent.HarnessAgent.Builder#artifactDeliveryTarget(ArtifactDeliveryTarget). When set, the deliver_artifact tool is registered and the sandbox system prompt instructs the model to use it; when unset, no delivery tool is exposed.

方法摘要Method Summary

方法Method说明Description
public ArtifactDeliveryResult deliver(RuntimeContext runtimeContext, ArtifactDeliveryRequest request)
执行 `deliver` 方法。
Delivers the artifact carried by `request` to its destination.

方法详情Method Detail

deliver

public ArtifactDeliveryResult deliver(RuntimeContext runtimeContext, ArtifactDeliveryRequest request)

执行 deliver 方法。

Delivers the artifact carried by request to its destination.

参数Parameters
名称Name类型Type说明Description
runtimeContextRuntimeContext运行时上下文(类型 `RuntimeContext`)。per-call agent runtime; may be `null` when no merged context is available
requestArtifactDeliveryRequest请求(类型 `ArtifactDeliveryRequest`)。the artifact to deliver (source file path, bytes, target file name, description, and the `force` flag). `request.fileName()` is already validated by the tool to be a plain file name (no path separators, `.` or `..`); the target decides how to map it to its destination layout.
返回Returns ArtifactDeliveryResult
返回ArtifactDeliveryResult。delivery result; implementations must not return `null`
源码Source io/agentscope/harness/agent/artifact/ArtifactDeliveryTarget.java:47
基于官方固定版本源码静态生成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.