Platform Capabilities

Intelligence SDK

Move beyond external widgets. The Snell Intelligence SDK provides strict, typed primitives for capturing user signal deep inside your React/Next.js application architecture.

Headless Signal Routing

The SDK allows you to bypass the standard Snell visual widget entirely. By exposing the core `dispatchIntegrationEvent` and `collect` methods, engineering teams can wire their own bespoke UI components (like a custom command palette or an inline table action) directly to the Snell cognitive engine.

Core Capabilities

Strict Type Safety
Full TypeScript support guarantees that your telemetry payloads conform to the expected schemas, preventing malformed data ingestion.
Model Agnostic Abstraction
Call the `synthesize` endpoint without hardcoding "gpt-4" or "claude-3-5-sonnet". The SDK securely handles optimal LLM routing on the backend.
Cryptographic Signing
Natively supports passing HMAC-SHA256 signatures from your secure server environments for trusted, authenticated feedback payloads.
Edge Optimized
The SDK is built to be lightweight and compatible with Edge Runtimes (Cloudflare Workers, Vercel Edge), keeping latency at an absolute minimum.

React Hook Examples

The easiest way to start tracking semantic interactions is by wrapping your application in our provider context.

import { useSnell } from '@snell/react';

function CustomFeedbackButton() {
  const { collect } = useSnell();

  const handleRageClick = async () => {
    await collect({
      intent: 'friction',
      raw_text: 'The table sorting is broken again.',
      traits: { revenue_tier: 'enterprise', component: 'DataTable' }
    });
  };

  return <button onClick={handleRageClick}>Report Issue</button>;
}