Capture LLM Boundary • AI Agent SDK
capture_llm_boundary: Capture exact state at LLM call boundary.
capture_llm_boundary
Method
</div>
This is a method of the ContextManager class in the manager module.
Capture exact state at LLM call boundary.
Call this immediately before sending to LLM to get exact snapshot.
Signature
def capture_llm_boundary(messages: List[Dict[str, Any]], tools: List[Dict[str, Any]]) -> SnapshotHookDataParameters
ParamField
ListExact messages being sent
ParamField
ListExact tool schemas being sent
Returns
ResponseField
SnapshotHookDataSnapshotHookData with hashes for verification
Uses
json.dumpshexdigesthashlib.sha256messages_json.encodetools_json.encodeSnapshotHookDataisoformatdatetime.nowget_ledgercallback
Source
View on GitHubpraisonaiagents/context/manager.py at line 590