Interface AgentResolver


public interface AgentResolver
Interface for resolving agents from various sources.

This interface abstracts the agent resolution logic, allowing different implementations for different scenarios (e.g., simple registry lookup, session-based resolution with memory management).

  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    hasMemory(String threadId)
    Check if a thread has existing memory/conversation history.
    io.agentscope.core.agent.Agent
    resolveAgent(String agentId, String threadId)
    Resolve an agent by its ID and thread ID.
  • Method Details

    • resolveAgent

      io.agentscope.core.agent.Agent resolveAgent(String agentId, String threadId)
      Resolve an agent by its ID and thread ID.
      Parameters:
      agentId - The agent ID to resolve
      threadId - The thread ID for session management
      Returns:
      The resolved agent
      Throws:
      AguiException.AgentNotFoundException - if the agent is not found
    • hasMemory

      boolean hasMemory(String threadId)
      Check if a thread has existing memory/conversation history.

      This is used to determine whether to use frontend-provided history or rely on server-side memory.

      Parameters:
      threadId - The thread ID to check
      Returns:
      true if the thread has existing memory