Skip to content

interaction

Typed interaction payloads for human-in-the-loop flows (questions, confirmations).

See [InteractionRequest] and [InteractionResponse] for the wire shape consumed by adapters.

A selectable option for interaction prompts.

Fields

FieldTypeDescription
idStringStable id for this option (used in selected_option_id on the response).
labelStringShort label shown in the UI.
descriptionOption<String>Optional longer description.

Request payload emitted by agents to ask for user input.

Fields

FieldTypeDescription
interaction_idStringCorrelates the request with [InteractionResponse::interaction_id].
kindInteractionKindQuestion vs confirmation flow.
questionStringPrompt text shown to the user.
optionsVec<InteractionOption>For choice-style prompts; empty if free-text only.
allow_free_textboolWhether the user may type an answer instead of picking an option.
allow_cancelboolWhether the user may dismiss without resolving (cancel).
default_option_idOption<String>Pre-selected option id when options is non-empty.
timeout_msOption<u64>Optional auto-expiry for the interaction (milliseconds).
continuation_idOption<String>Optional id for multi-step / resumed flows.
source_nodeOption<String>Optional coordination graph node id (if applicable).
metadataOption<serde_json::Value>Arbitrary extension payload.

Response payload for resolving a pending interaction.

Fields

FieldTypeDescription
interaction_idStringMust match the pending [InteractionRequest::interaction_id].
selected_option_idOption<String>Chosen option when the user picked from options.
free_textOption<String>Free-text answer when allow_free_text was true.
confirmedOption<bool>For confirmations: explicit true/false when applicable.
cancelledboolTrue when the user cancelled instead of resolving.
metadataOption<serde_json::Value>Arbitrary extension payload.

Interaction kinds supported by the typed interaction contract.

Variants

VariantDescription
Question
Confirmation