Class SessionSearchTool

java.lang.Object
io.agentscope.harness.agent.tool.SessionSearchTool

public class SessionSearchTool extends Object
Tool for searching past session transcripts and viewing session history.

Operates exclusively on the local session cache. Remote synchronisation is handled by SessionTree.load() in write paths (e.g. MemoryFlushManager), keeping this tool lightweight and fast for in-process search.

  • Constructor Details

    • SessionSearchTool

      public SessionSearchTool(WorkspaceManager workspaceManager)
  • Method Details

    • sessionSearch

      @Tool(name="session_search", readOnly=true, description="Search past session transcripts for a keyword or phrase. Returns matching entries with session context.") public String sessionSearch(io.agentscope.core.agent.RuntimeContext runtimeContext, @ToolParam(name="query",description="Search query (keyword or phrase)") String query, @ToolParam(name="agentId",description="Agent ID to search sessions for",required=false) String agentId, @ToolParam(name="maxResults",description="Maximum number of results to return (default: 10)",required=false) Integer maxResults)
    • sessionList

      @Tool(name="session_list", readOnly=true, description="List available sessions for an agent, showing session IDs and metadata.") public String sessionList(io.agentscope.core.agent.RuntimeContext runtimeContext, @ToolParam(name="agentId",description="Agent ID to list sessions for") String agentId)
    • sessionHistory

      @Tool(name="session_history", readOnly=true, description="Get the conversation history for a specific session. Returns the messages in the session.") public String sessionHistory(io.agentscope.core.agent.RuntimeContext runtimeContext, @ToolParam(name="agentId",description="Agent ID") String agentId, @ToolParam(name="sessionId",description="AgentStateStore Session ID") String sessionId, @ToolParam(name="lastN",description="Number of recent messages to return (default: 20)",required=false) Integer lastN)