Skip to main content

TypeScript Types

The Moss SDK is written in TypeScript and exports all public types for use in your application.

Core Types

AgentState

The return type of the useAgent() hook. Contains all state and methods for controlling the assistant.

ChatMessage

Represents a single message in the conversation.

DefaultModalPosition

Position and size configuration for the chat modal.

Configuration Types

MossSDKConfig

The configuration object passed to AgentProvider.
At least one of applicationId or applicationName is required.

ScreenshotMode

How screenshots are captured for AI context.

LogLevel

Logging verbosity levels.

SessionConfig

Configuration for session management behavior.

Stability Types

StabilityConfig

Configuration for page stability detection before context capture.

StabilityLayersConfig

Toggle individual stability detection layers.

Appearance Types

AppearanceInput

Visual theme configuration.

MossAppearance

Full appearance configuration object (for custom themes).
Use DeepPartial<MossAppearance> when providing custom overrides. Only specify the values you want to change.

Usage Example