MCPcopy Index your code
hub / github.com/InfinitiBit/graphbit / get

Method get

python/src/memory/client.rs:124–135  ·  view source on GitHub ↗

Get a single memory by its ID.

(&self, py: Python<'_>, memory_id: String)

Source from the content-addressed store, hash-verified

122
123 /// Get a single memory by its ID.
124 fn get(&self, py: Python<'_>, memory_id: String) -> PyResult<Option<PyMemory>> {
125 let id = parse_memory_id(&memory_id)?;
126 let service = Arc::clone(&self.service);
127 let rt = get_runtime();
128
129 py.allow_threads(|| {
130 rt.block_on(async move {
131 let mem = service.get(&id).await.map_err(to_py_runtime_error)?;
132 Ok(mem.map(PyMemory::from))
133 })
134 })
135 }
136
137 /// Get all memories matching the given scope.
138 #[pyo3(signature = (user_id=None, agent_id=None, run_id=None))]

Callers 15

init_runtime_with_configFunction · 0.45
get_runtime_statsFunction · 0.45
is_runtime_initializedFunction · 0.45
shutdown_runtimeFunction · 0.45
get_variableMethod · 0.45
get_tool_metadataMethod · 0.45
execute_toolMethod · 0.45
get_metadataMethod · 0.45
extract_node_toolsMethod · 0.45
extract_llm_toolsMethod · 0.45

Calls 2

parse_memory_idFunction · 0.85
get_runtimeFunction · 0.50

Tested by

no test coverage detected