before_agent(
self,
state: LocalContextState,
runtime: Runtime
) -> dict[str,| Name | Type | Description |
|---|---|---|
state* | LocalContextState | |
runtime* | Runtime |
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.
Current agent state.
Runtime context.