Class Artifact

java.lang.Object
com.google.genkit.ai.agent.Artifact

public class Artifact extends Object
Artifact represents a named collection of content parts produced during agent execution.
  • Constructor Details

    • Artifact

      public Artifact()
      Default constructor.
  • Method Details

    • builder

      public static Artifact.Builder builder()
      Creates a builder for Artifact.
      Returns:
      a new builder
    • getName

      public String getName()
      Returns the artifact name.
      Returns:
      the name
    • setName

      public void setName(String name)
      Sets the artifact name.
      Parameters:
      name - the name
    • getParts

      public List<Part> getParts()
      Returns the artifact parts.
      Returns:
      the parts (never null)
    • setParts

      public void setParts(List<Part> parts)
      Sets the artifact parts.
      Parameters:
      parts - the parts
    • getMetadata

      public Map<String,Object> getMetadata()
      Returns the artifact metadata.
      Returns:
      the metadata, or null if not set
    • setMetadata

      public void setMetadata(Map<String,Object> metadata)
      Sets the artifact metadata.
      Parameters:
      metadata - the metadata