Documentation index for AI agents: see /llms.txt. Markdown versions of every page are available at <path>.md or via Accept: text/markdown.
Reference

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]'

ParameterTypeDefault
valueAnyrequired
max_itemsint3

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.

On this page