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 TypeMethodDescriptionbooleanCheck if a thread has existing memory/conversation history.io.agentscope.core.agent.AgentresolveAgent(String agentId, String threadId) Resolve an agent by its ID and thread ID.
-
Method Details
-
resolveAgent
Resolve an agent by its ID and thread ID.- Parameters:
agentId- The agent ID to resolvethreadId- The thread ID for session management- Returns:
- The resolved agent
- Throws:
AguiException.AgentNotFoundException- if the agent is not found
-
hasMemory
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
-