MCPcopy Create free account
hub / github.com/SkyworkAI/DeepResearchAgent / get_state

Method get_state

src/memory/server.py:235–250  ·  view source on GitHub ↗

Get memory state (events, summaries, insights) for a memory system. Args: name: Memory system name n: Number of items to retrieve. If None, returns all items. ctx: Memory context Returns: Dictionary containing 'events', 'summar

(self, 
                        name: str, 
                        n: Optional[int] = None, 
                        ctx: SessionContext = None,
                        **kwargs
                        )

Source from the content-addressed store, hash-verified

233 return await self.memory_context_manager.clear_session(memory_name, ctx=ctx, **kwargs)
234
235 async def get_state(self,
236 name: str,
237 n: Optional[int] = None,
238 ctx: SessionContext = None,
239 **kwargs
240 ) -> Dict[str, Any]:
241 """Get memory state (events, summaries, insights) for a memory system.
242
243 Args:
244 name: Memory system name
245 n: Number of items to retrieve. If None, returns all items.
246 ctx: Memory context
247 Returns:
248 Dictionary containing 'events', 'summaries', and 'insights'
249 """
250 return await self.memory_context_manager.get_state(name, n, ctx, **kwargs)
251
252 async def get_variables(self, memory_name: Optional[str] = None) -> Dict[str, 'Variable']:
253 """Get variables from memory systems, where each memory's code is used as the variable value.

Callers 15

mainFunction · 0.95
_get_agent_contextMethod · 0.45
_get_agent_historyMethod · 0.45
_get_agent_historyMethod · 0.45
_get_agent_contextMethod · 0.45
_get_agent_contextMethod · 0.45

Calls

no outgoing calls

Tested by 3

mainFunction · 0.76
test_interday_tradingFunction · 0.36
test_intraday_tradingFunction · 0.36