MCPcopy Index your code
hub / github.com/AI45Lab/Code / list_sessions

Method list_sessions

sdk/python/src/lib.rs:1367–1370  ·  view source on GitHub ↗

List session IDs for every live session created from this agent. Sessions that have been dropped (no Python references remain) are pruned lazily on each call. Result is sorted for stable output.

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

Source from the content-addressed store, hash-verified

1365 /// Sessions that have been dropped (no Python references remain) are
1366 /// pruned lazily on each call. Result is sorted for stable output.
1367 fn list_sessions(&self, py: Python<'_>) -> Vec<String> {
1368 let agent = self.inner.clone();
1369 py.allow_threads(move || get_runtime().block_on(agent.list_sessions()))
1370 }
1371
1372 /// Close a specific live session by its session ID.
1373 ///

Callers 1

mainFunction · 0.45

Calls 3

block_onMethod · 0.80
get_runtimeFunction · 0.70
cloneMethod · 0.45

Tested by 1

mainFunction · 0.36