Skip to main content

Overview

This page provides complete, copy-paste ready configuration examples for different use cases using the AgentProvider component.

Minimal Setup

The simplest configuration to get started:
This uses all Dashboard defaults. Perfect for quick testing or when Dashboard settings meet your needs.

Power User Setup

Full-featured configuration for users who need comprehensive assistance:

Developer / Debug Setup

Configuration optimized for development and debugging:
Remember to disable debug settings in production for better performance.

Privacy-Focused Setup

Minimal data collection for privacy-conscious users:

Multi-Tier Subscription Setup

Different configurations based on subscription level:

Next.js App Router

Complete setup for Next.js with App Router:
app/layout.tsx
components/moss-assistant.tsx
app/api/moss-token/route.ts

Custom Branding Setup

Customize the assistant’s visual appearance to match your brand:
Or use a preset theme:
Partial appearance objects are deep-merged with the base theme, so you only need to specify the properties you want to customize.

High-Performance Setup

Optimized for minimal overhead:

Best Practices Summary

Dashboard vs SDK Configuration

Use Dashboard Settings When:
  • Setting application-wide defaults
  • Configuring security policies (allowed domains, API keys)
  • Managing AI instructions that apply to all users
  • Settings that rarely change
Use SDK Configuration When:
  • Per-user customization is needed
  • Configuration depends on environment (dev/staging/prod)
  • Different user tiers need different settings
  • Integrating with existing user preferences

Performance Tips

  1. Screenshot Mode: Use viewport for long pages
  2. Stability Layers: Disable loadingIndicators and layoutShift unless needed
  3. Session Recording: Disable for privacy-sensitive pages
  4. Log Level: Use WARN or ERROR in production

Security Tips

  1. Never expose API keys in client-side code
  2. Use domain restrictions in Dashboard
  3. Implement user consent for session recording
  4. Use hashed/anonymized user IDs

Need Help?

SDK Reference

Complete SDK options reference

Advanced Configuration

Stability tuning and advanced features