close • AI Agent SDK

close: Synchronously close the agent and clean up resources.

close

Method

</div>

This is a method of the Agent class in the agent module.

Synchronously close the agent and clean up resources.

Signature

python
def close() -> None

Uses

  • memory.close_connections
  • logger.warning
  • asyncio.iscoroutinefunction
  • run_coroutine_from_any_context
  • aclose
  • close
  • llm_client.close
  • t.shutdown
  • task.cancel
  • lock.sync

Used By

Source

View on GitHub

praisonaiagents/agent/agent.py at line 8101