Close Connections • AI Agent SDK
close_connections: Close database connections.
close_connections
Method
</div>
Close database connections.
Closes only the calling thread’s STM/LTM SQLite connections (and the process-wide MongoDB client, if any). Connections owned by other threads are left untouched so concurrent agents are not interfered with — each thread is responsible for calling this before terminating. For full process shutdown, use the adapter’s own bulk-close path.
Signature
def close_connections() -> AnyReturns
ResponseField
AnyThe result of the operation.
Uses
discardcloselogger.warningclose_thread_connectionslogger.debugcallable
Used By
Source
View on GitHubpraisonaiagents/memory/memory.py at line 2527