Decision events
Each completed evaluation adds adecision_result item to public output. Its value contains decision/provider versions, typed answers, the policy outcome, duration, and a safe error category when evaluation falls back. Request state, question instructions, and raw provider payloads are excluded. Private graph-to-model inputs are not presented as user turns when restoring conversation history in ADK or LangGraph. SSE and WebSocket use response.decision_result; streaming A2A tasks use metadata.harnest.type: decision_result. Playground displays an expandable Decision panel. Streamed results appear when the backend next yields an event.
Raw metadata
Raw mode keeps the normalized fields and addsraw. ADK uses its native LlmResponse metadata field names. LangGraph namespaces stream_metadata, response_metadata, usage_metadata, and additional_kwargs so fields do not collide. The primary message content and Harnest-owned event state are not copied. Native metadata can still contain provider-defined content-like values, including reasoning annotations in additional_kwargs.
Exports
AgentMetadata
One framework-neutral view of model and provider response metadata.raw is populated only when OutputPolicy explicitly selects
:attr:AgentMetadataMode.RAW. The normalized fields remain available in
normalized and raw modes so consumers do not need framework-specific keys.
— means no declared default):
Parameters and example
Parameters and example
AgentMetadata.as_dict
Example
Example
AgentMetadataMode
Select how much model and provider metadata callers receive.Example
Example
OutputPolicy
Control narration, tool activity, decisions, reasoning, and public metadata.— means no declared default):
Parameters and example
Parameters and example
OutputPolicy.includes_intermediate_message
Parameters and example
Parameters and example
OutputPolicy.includes_event
Parameters and example
Parameters and example
TokenUsage
Provider-reported token counts normalized across ADK and LangGraph.— means no declared default):
Parameters and example
Parameters and example
TokenUsage.as_dict
Example
Example
TokenUsage.from_dict
Parameters and example
Parameters and example