Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

SDK Overview

@amodalai/react connects a web application to a deployed Amodal runtime over HTTP and server-sent events.

NeedUse
Add chat to a React appChatWidget, available from @amodalai/react/widget.
Build a UI with agent actions, sessions, and eventsAmodalProvider and hooks.
Render inline chat inside a providerAmodalChat.
Call runtime APIs from imperative codeRuntimeClient, SdkClient, or ChatClient.

Install

npm install @amodalai/react

The package requires React and React DOM 18 or 19. Import @amodalai/react/style.css when using the chat components.

Authentication

For an app served at the agent's own origin, use window.location.origin as the runtime URL and omit getToken. See Hosted browser login.

For a multi-tenant product, point the SDK at an application proxy that keeps runtime credentials and authorizes each scope, session, and operation. Pass getToken separately to AmodalProvider and AmodalChat. See Embedding.