Skip to content

AIDK API Reference / aidk/jsx / Grounding

Function: Grounding() ​

ts
function Grounding(props: GroundingProps): Element;

Defined in: packages/core/src/jsx/components/messages.tsx:406

Grounding component - semantic wrapper for Ephemeral.

For dynamic state and world information that the model should be aware of. This is ephemeral content (not persisted) that provides current context.

Formatting (delimiters, etc.) is configured at the model level via modelOptions.messageTransformation, not in JSX props.

Parameters ​

ParameterType
propsGroundingProps

Returns ​

Element

Example ​

ts
// Basic usage with title
<Grounding title="Current State">
  Active todos: {JSON.stringify(todos)}
</Grounding>

// Positioned before user's message
<Grounding title="User Preferences" position="before-user">
  Theme: dark, Language: en
</Grounding>

// With type for semantic categorization
<Grounding type="system_state" audience="model">
  {stateJson}
</Grounding>

Released under the MIT License.