Get started

AI co-pilot props

The generated props of every element on AI co-pilot. The guide is where they are explained; this is every prop.

AgentThreadsProvider

children

ReactNode

required

The tree that reads the threads: every surface that shows or drives a conversation.

enabled

boolean

default: true

Whether the co-pilot runs here. A provider that is not enabled builds no engine, opens no transport and registers no tab strip: its readers see a conversation set that stays empty on the Search tab, and its commands do nothing, so the co-pilot's panel never opens. The tree beneath keeps its place across a change of it.

invalidateAiConfig

(organizationId: string) => void

invalidateAiConfig marks the organization's AI configuration stale after a fault that turns on it: a run refused as not-configured, or one refused for access.

A callback rather than a query key read here, because the key belongs to whatever cache the host binds and this provider has no business naming one: the conversation faults it feeds already take the invalidation as a function. Absent, the fault still surfaces its message and the config is re-read on the next natural refetch, which is the correct defined absence for a host with no cache of its own.

invalidateMemberships

() => void

invalidateMemberships marks the reader's memberships stale after a run is refused or ended for want of access: its start or its stream answered 402, 403 or 404, a message that found its run gone, or a run ended because its member may not run it there any more (no write role in its organization, or an agreement that does not include Map Studio).

A callback for the reason invalidateAiConfig is one: the memberships are whatever the host's cache holds. The co-pilot's availability is read off them, so the notice that follows the refresh says why the co-pilot is withheld. Absent, the refusal still surfaces its message and the memberships are re-read on their next refetch.

recoveryAddendum

RecoveryAddendum

The host's own remedy for a failed call, appended to the playbook's recovery the model reads with it; see RecoveryAddendum. Omitted, the model reads the playbook's recovery alone.

routesServerTools

boolean

Whether a run names the server tools its model sees, from the tools the conversation's surfaces route to. Leave it off under a publishable key, whose runs call no server tool and are refused a list naming any; turn it on under the browser's own session to narrow the server tools a run offers its model.

threadsUrl

AgentThreadsUrlSeam

How the co-pilot's open conversations survive a reload; see AgentThreadsUrlSeam.

StudioCopilotProvider

children

ReactNode

required

The surfaces that read the co-pilot's availability.

seam

StudioCopilotSeam

required

The host's answer per organization. Its identity must be stable across renders.

Handlers

An on* handler suppresses the element's own default. Left unset, the element acts; set, it becomes presentational and your handler decides. The two never both fire.

onSignInRefused

() => void

onSignInRefused asks the host whether the reader is still signed in after the API refused the browser's own session under a run: its start, its stream or a message into it answered 401, as it is once the reader signs out or their session is revoked. Called once per refusal.

A callback for the reason invalidateAiConfig is one: how a person signs in is the host's. It is handed to the engine only where the client above rides the browser's own session: under a publishable key a 401 refuses the key or the session token beside it, which is no sign-in a host can ask about. Absent, the refusal still surfaces its message.