Skip to main content
Output policy changes which events and metadata Harnest publishes. It does not change prompts or model responses. Define one policy in lifecycle/output.py. See OutputPolicy for every option and default.

Choose SubAgent narration

Choose provider reasoning

Set thinking=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

Set tool_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. Set decision_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 default AgentMetadataMode.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.
Native metadata can contain provider identifiers, diagnostic details, and other sensitive or high-cardinality values. Raw values cross every enabled neutral transport and may be persisted by a remote A2A task store. Enable raw mode only for callers authorized to receive that provider payload. Harnest never copies raw metadata into its playground trace history.
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.
Persisted raw metadata remains available for the lifetime of the durable run. Enable persist_raw_agent_metadata only when storage, retention, and caller authorization are appropriate for the native provider payload.

What remains visible

Intermediate narration may be provisional and later revised. Use True only when your product deliberately presents progress.
Use keyword arguments, booleans, and AgentMetadataMode values. For older positional or string forms, run harnest upgrade AGENT_DIR --apply.

Scope