Run context detection on first interaction and refresh after summarization.
On the first invocation, runs the detection script and stores the result.
After a summarization event (indicated by a new _summarization_event
in state), re-runs the script to capture any environment changes that
occurred during the session.
before_agent(
self,
state: LocalContextState,
runtime: Runtime
) -> dict[str, Any] | None| Name | Type | Description |
|---|---|---|
state* | LocalContextState | Current agent state. |
runtime* | Runtime | Runtime context. |