Shutdown Forensics Protocol • AI Agent SDK

ShutdownForensicsProtocol: Protocol for capturing forensics when a gateway dies unexpectedly.

ShutdownForensicsProtocol

Defined in the protocols module.

AI Agent

Protocol for capturing forensics when a gateway dies unexpectedly.

Pure contract consumed by the wrapper’s signal handlers. `snapshot must be fast (<10ms), never raise, and never block the asyncio teardown; spawn_diagnostic` is fire-and-forget and must run the diagnostic in a

detached session so a `SIGKILL on the process group does not also kill the diagnostic. Concrete OS I/O (/proc reads, os.getrusage, os.getloadavg`, subprocess spawn) lives in the wrapper implementation.

Methods

Source

View on GitHub

praisonaiagents/gateway/protocols.py at line 5737