Glimpse
A glimpse is the small summary stored beside a reference. It lets an agent reason about what a referenced value contains without resolving the full payload into the prompt.
A glimpse is the small summary stored beside a reference. It lets an agent reason about what a referenced value contains without resolving the full payload into the prompt.
Use glimpse(...) inside reference callbacks or tools when you already have
domain-specific summary data and want to normalize it into JSON-compatible
values. Customer code chooses the meaningful fields, such as counts, labels,
sample ids, or aggregate metrics. For sequence inputs, the helper produces a
safe {count, sample} fallback.
For how glimpses work with reference handles, see References & glimpses.
glimpse
glimpse(value: 'Any', *, max_items: 'int' = 3) -> 'dict[str, Any]'
| Parameter | Type | Default |
|---|---|---|
value | Any | required |
max_items | int | 3 |
Returns: dict[str, Any]
Build a small schema-neutral glimpse from customer-provided data.
Domain-specific fields belong in customer code. For example, a customer can
pass a hand-built summary dict from ReferenceSpec.glimpse and this helper
will only normalize it to JSON-compatible values.
Unions
Unions describe payloads that can take one of several typed shapes. In Flow AI they are most often used for plan action schemas, where each action has a discriminator such as...
Runtime events
Runtime events are the observable stream emitted while a run is happening. They let an application or Studio UI render text, reasoning, tool calls, sub-agent handoffs, approval...
