Class AgentRef

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

public final class AgentRef extends Object
AgentRef is a lightweight reference to an agent, carrying only its name and description.

Returned by AgentApi.ref() so callers can identify the agent without holding the full implementation object.

  • Constructor Details

    • AgentRef

      public AgentRef(String name, String description)
      Constructs an AgentRef.
      Parameters:
      name - the agent's registered name
      description - the agent's human-readable description; may be null
  • Method Details

    • getName

      public String getName()
      Returns the agent name.
      Returns:
      the agent name
    • getDescription

      public String getDescription()
      Returns the agent description.
      Returns:
      the description, or null if not set