Interface ArtifactDeliveryTarget

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface ArtifactDeliveryTarget
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 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

    Modifier and Type
    Method
    Description
    deliver(io.agentscope.core.agent.RuntimeContext runtimeContext, ArtifactDeliveryRequest request)
    Delivers the artifact carried by request to its destination.
  • Method Details

    • deliver

      ArtifactDeliveryResult deliver(io.agentscope.core.agent.RuntimeContext runtimeContext, ArtifactDeliveryRequest request)
      Delivers the artifact carried by request to its destination.
      Parameters:
      runtimeContext - per-call agent runtime; may be null when no merged context is available
      request - 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:
      delivery result; implementations must not return null