Package io.agentscope.harness.agent.tool
Class SessionSearchTool
java.lang.Object
io.agentscope.harness.agent.tool.SessionSearchTool
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 Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionsessionHistory(io.agentscope.core.agent.RuntimeContext runtimeContext, String agentId, String sessionId, Integer lastN) sessionList(io.agentscope.core.agent.RuntimeContext runtimeContext, String agentId) sessionSearch(io.agentscope.core.agent.RuntimeContext runtimeContext, String query, String agentId, Integer maxResults)
-
Constructor Details
-
SessionSearchTool
-
-
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
-
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)
-