Skip to content

Extension guides

Contribution slots

NativePi controls where extension UI can appear. Choose the narrowest slot that matches the information's lifetime and the reader's task.

Choose a slot

SlotUse it forAvoid
toolsCall progress and structured results in the transcriptPersistent project controls
entriesCustom durable session entriesData that should enter model context
composerWidgetsState that affects the next messageTall, consultative content
composerControlsOne compact, frequent action or modeForms or multi-step interactions
conversationViewsA complete extension workspace opened from the chat headerSmall controls or turn feedback
panelsProject information consulted beside the transcriptUrgent turn feedback
settingsDurable extension configurationNativePi-only copies of Pi state

Renderer definition

export default defineRenderer({
  apiVersion: 1,
  protocol,
  tools: {},
  entries: {},
  composerWidgets: [],
  composerControls: [],
  conversationViews: [],
  panels: [],
  settings: [],
});

Every field except apiVersion is optional. Tool and entry renderers are records keyed by the Pi name or session-entry type. Array contributions use a unique, stable id within their slot. NativePi rejects duplicate IDs.

Ownership and conflicts

The first configured extension with a renderer for a given tool name or entry type owns that visual renderer. Array contributions coexist and are identified by package plus contribution ID.

Contributions cannot replace application navigation, routing, or the agent loop. A conversation view may replace the transcript and composer within the existing conversation pane while it is open. Use Pi APIs for anything that changes model context, tools, commands, sessions, or turn sequencing.

Slot guides