类 Artifact

java.lang.Object
io.github.a2ap.core.model.Artifact
所有已实现的接口:
TaskUpdate

public class Artifact extends Object implements TaskUpdate
Represents an artifact produced by a task during agent execution. Artifacts are structured outputs generated by agents as they process tasks. They represent discrete pieces of work or content that can be created, modified, or referenced throughout the task lifecycle. Artifacts provide a way to track and manage the tangible outputs of agent processing. Key characteristics: - Each artifact has a unique identifier within the task context - Artifacts can contain multiple parts of different types (text, files, data) - They can be incrementally updated through TaskArtifactUpdateEvent objects - Metadata provides additional context for processing or display purposes Common artifact types include: - Generated documents or reports - Code files or scripts - Data analysis results - Configuration files - Media content Artifacts implement the TaskUpdate interface, allowing them to be used in task update operations and event streaming scenarios.
  • 构造器详细资料

  • 方法详细资料

    • builder

      public static Artifact.Builder builder()
    • getArtifactId

      public String getArtifactId()
    • setArtifactId

      public void setArtifactId(String artifactId)
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getDescription

      public String getDescription()
    • setDescription

      public void setDescription(String description)
    • getParts

      public List<Part> getParts()
    • setParts

      public void setParts(List<Part> parts)
    • getMetadata

      public Map<String,Object> getMetadata()
    • setMetadata

      public void setMetadata(Map<String,Object> metadata)
    • equals

      public boolean equals(Object o)
      覆盖:
      equals 在类中 Object
    • hashCode

      public int hashCode()
      覆盖:
      hashCode 在类中 Object
    • toString

      public String toString()
      覆盖:
      toString 在类中 Object