lifecycle/output.py. See OutputPolicy for every option and default.
Choose SubAgent narration
Choose provider reasoning
Setthinking=True only when callers may receive provider-exposed reasoning and provisional narration.
This controls readable ADK thought parts and LangGraph reasoning content. It
does not enable model reasoning or expose provider signatures.
Choose tool activity
Settool_activity=False to hide tool progress while keeping execution enabled.
The default publishes tool_call and tool_result events. A2A always keeps tool arguments and results private.
Choose decision results
Decision results stay private by default. Setdecision_results=True to publish results from context.decisions.evaluate(...) separately from the final answer.
Published events include typed answers, policy outcomes, and timing, excluding request state and raw provider payloads. See decision event details.
Visibility does not redact values copied into tool results, final responses, or model text, or delete earlier disclosures. Opted-in events can persist in durable output. Direct Decisions.evaluate(...) calls do not publish events.
See the Jev example
for a decision followed by an LLM reply.
Choose agent metadata
The defaultAgentMetadataMode.NORMALIZED exposes reported model, provider, finish reason, and exact token counts. Missing values are not estimated.
Set agent_metadata=AgentMetadataMode.SUPPRESS to hide model/provider metadata and aggregate usage, including durable snapshots.
Set agent_metadata=AgentMetadataMode.RAW when authorized callers need native framework metadata.
Raw mode adds the native payload to normalized fields. It may include provider content and reasoning annotations; see raw metadata fields.
Normalized completion metadata is durable with Harnest-owned checkpoint storage. Raw metadata is ephemeral unless explicitly persisted:
Set persist_raw_agent_metadata=True together with agent_metadata=AgentMetadataMode.RAW.
Snapshots are limited to 4 MiB and follow checkpoint retention: the run’s lifetime in PostgreSQL or the configured Redis TTL.
What remains visible
Use keyword arguments, booleans, and
AgentMetadataMode values. For older positional or string forms, run harnest upgrade AGENT_DIR --apply.