Close every live session created from this agent and disconnect background resources owned by the agent (global MCP connections). After this call, ``agent.session(...)`` and ``agent.resume_session(...)`` raise ``RuntimeError`` with a "Session closed" message. Idempotent.
(&self, py: Python<'_>)
| 1385 | /// After this call, ``agent.session(...)`` and ``agent.resume_session(...)`` |
| 1386 | /// raise ``RuntimeError`` with a "Session closed" message. Idempotent. |
| 1387 | fn close(&self, py: Python<'_>) { |
| 1388 | let agent = self.inner.clone(); |
| 1389 | py.allow_threads(move || get_runtime().block_on(agent.close())); |
| 1390 | } |
| 1391 | |
| 1392 | /// Whether ``close()`` has been called on this agent. |
| 1393 | #[getter] |