Community Resource: Not affiliated with TypeSafe AI. · Read full notice
Official Reference Demo Source: TypeSafe AI

Smart Home Assistant (Speculative Fan-out Reference)

The official Smart Home Assistant demonstrates how a voice or text command like "Turn off all lights and set the bedroom AC to 22°C" is processed without multi-turn LLM agent loops. The system fans out dozens of typed questions in parallel—evaluating lighting, climate, security, and audio states concurrently.

Instant Concurrency: Single API call answers 15+ sub-device intent questions simultaneously.
Deterministic Parsing: Directly outputs typed Choice and Score objects with zero token hallucination.
Low Latency: Sub-150ms roundtrip execution suitable for real-time edge devices.

Core System One Design Patterns

Pattern 01

Speculative Intent Fan-out

When a user input arrives, the application immediately dispatches multiple parallel typed queries across multiple domain questions (e.g. intent classification, entity extraction, sentiment thresholding). Jev returns calibrated scores simultaneously.

const [intent, urgency] = await Promise.all([...])
Pattern 02

Guardrail Scoring & Routing

Use high-speed Score primitives (0.0 to 1.0) to gate risky operations or route requests between low-latency local paths and expensive long-thinking models.

if (safetyScore > 0.95) executeFastPath()
Pattern 03

Drop-in OpenAI Adapter Pipeline

Wrap existing generative LLM chains with the official Jev adapter to replace text-generation intent parsing with structured decision evaluations without rewriting application logic.

import { createJevAdapter } from '@typesafe-ai/adapter'