# Clarity Labs Developer Docs > Open-source TypeScript SDKs for regulated AI agents, local-first sync, and durable workflow execution. ## Docs - [Clarity Labs SDK: Provider-Agnostic LLM Insurance Toolkit](https://claritylabs.inc/docs/cl-sdk/index.md): Build LLM-powered insurance workflows with source-grounded extraction, citation-backed queries, application pipelines, and PCE processing—no framework lock-in. - [CL SDK Quickstart: Extract, Query, and Process in Minutes](https://claritylabs.inc/docs/cl-sdk/quickstart.md): Install @claritylabs/cl-sdk, wire up your first provider callbacks, and run document extraction, queries, and PCE workflows end-to-end. - [CL SDK Architecture: Eight Systems, One Evidence Layer](https://claritylabs.inc/docs/cl-sdk/architecture.md): Learn how CL SDK's eight pipeline systems connect through a shared source-grounding layer to produce auditable, citation-backed insurance workflow outputs. - [CL SDK Model Callbacks: GenerateText, GenerateObject, EmbedText](https://claritylabs.inc/docs/cl-sdk/models.md): Full type reference and working provider examples for the three CL SDK callback types—wire up Anthropic, OpenAI, or the Vercel AI SDK in minutes. - [CL SDK Seven-Phase Insurance PDF Extraction Pipeline](https://claritylabs.inc/docs/cl-sdk/extraction/pipeline.md): Understand the 7-phase extraction pipeline that converts insurance PDFs into structured, source-backed operational profiles and compatibility documents. - [Policy Classification Using ACORD Lines-of-Business Codes](https://claritylabs.inc/docs/cl-sdk/extraction/classification.md): Learn how CL SDK 4.0 classifies insurance policies using ACORD lines-of-business codes returned as part of the source-backed operational profile. - [Policy Form Structure and Source Tree Organization](https://claritylabs.inc/docs/cl-sdk/extraction/form-inventory.md): Learn how the CL SDK source tree represents policy form structure and how to work with form inventory projections and coverage lines. - [Working with ExtractionResult and InsuranceDocument](https://claritylabs.inc/docs/cl-sdk/extraction/applying-results.md): Understand the ExtractionResult shape, narrow InsuranceDocument by type, persist source evidence, and track token usage after extraction. - [Query Agent Pipeline: Citations and Grounded Answers](https://claritylabs.inc/docs/cl-sdk/query/pipeline.md): Learn how the 6-phase query agent answers insurance questions against stored documents with grounded, citation-backed, verifiable responses. - [Query Citations and Provenance: Structure and Usage](https://claritylabs.inc/docs/cl-sdk/query/citations.md): Learn how the query agent builds and verifies inline citations so every factual claim traces back to a specific source chunk and quoted text. - [Policy Change Endorsement: Agent Overview and Quick Start](https://claritylabs.inc/docs/cl-sdk/pce/overview.md): Turn natural-language change requests into structured, reviewable carrier work with the CL SDK PCE agent, validation, and submission tooling. - [PCE Workflow: State Machine Phases and Execution Modes](https://claritylabs.inc/docs/cl-sdk/pce/workflow.md): Walk through the PCE state machine phases, execution mode selection logic, and standalone helpers available for custom integrations. - [PCE Submission Packets: Generation and Quality Review](https://claritylabs.inc/docs/cl-sdk/pce/submission-packet.md): Generate carrier-ready PCE submission packets, run quality gate checks, and complete the review checklist before handing off to a licensed reviewer. - [Insurance Application Processing Pipeline: Overview](https://claritylabs.inc/docs/cl-sdk/application/overview.md): Process insurance application PDFs end-to-end: extract fields, auto-fill from context, batch questions for clients, and map the completed PDF. - [Case Workflow Primitives: Evidence, Validation, and IDs](https://claritylabs.inc/docs/cl-sdk/case/overview.md): Use shared case primitives — evidence, citations, validation, and missing info — to build durable agent workflows beyond the built-in PCE pipeline. - [Source Grounding: Evidence Layer for All Workflows](https://claritylabs.inc/docs/cl-sdk/source-grounding/overview.md): Source grounding is the shared evidence layer for extraction, query, PCE, and case workflows in CL SDK. Every result traces back to a quoted span. - [Building Source Spans for a Verifiable Evidence Layer](https://claritylabs.inc/docs/cl-sdk/source-grounding/source-spans.md): Learn how to build SourceSpan objects from PDF pages, sections, tables, and free text to create a stable, verifiable evidence layer. - [Source Retrieval: Searching Spans and Document Nodes](https://claritylabs.inc/docs/cl-sdk/source-grounding/retrieval.md): Search source spans and document nodes using SourceRetriever with configurable retrieval modes, filters, and deterministic result ordering. - [CL SDK Storage Interfaces: Documents, Memory, Source](https://claritylabs.inc/docs/cl-sdk/storage/overview.md): CL SDK defines provider-agnostic storage interfaces for documents, vector memory, and source spans. Implement them against your own database. - [Building Modular Insurance Agent System Prompts in CL SDK](https://claritylabs.inc/docs/cl-sdk/agent/system-prompt.md): Compose modular, platform-aware system prompts for insurance agents using buildAgentSystemPrompt and the individual prompt module functions. - [CL SDK Agent Tool Definitions for Insurance Operations](https://claritylabs.inc/docs/cl-sdk/agent/tools.md): CL SDK exports Claude tool_use-compatible schema-only tool definitions for document lookup, COI generation, and coverage comparison. - [CL SDK API Reference: All Public Factory Functions](https://claritylabs.inc/docs/cl-sdk/reference/api.md): Complete reference for all CL SDK factory functions, source grounding builders, storage factories, agent prompts, PCE helpers, and PDF operations. - [CL SDK TypeScript Type and Interface Reference Guide](https://claritylabs.inc/docs/cl-sdk/reference/types.md): TypeScript type and interface reference for CL SDK, covering provider callbacks, extraction, documents, source grounding, storage, agents, and PCE. - [ACORD Line of Business Codes and CL SDK Policy Taxonomy](https://claritylabs.inc/docs/cl-sdk/reference/policy-taxonomy.md): Use the policy-taxonomy sub-path export to validate, normalize, and label ACORD LOB codes across all 107 accepted commercial and personal lines. - [CL SDK MCP Server: Setup Guide for AI Coding Assistants](https://claritylabs.inc/docs/cl-sdk/mcp-server.md): Install the @claritylabs/cl-sdk-mcp companion package to give Claude, Cursor, and Windsurf live access to CL SDK documentation while you code. - [CL Sync: Local-First React Sync Library](https://claritylabs.inc/docs/cl-sync/index.md): CL Sync hydrates your React app instantly from IndexedDB and reconciles with your server in the background — zero loading spinners. - [Get Started with CL Sync in Your React App](https://claritylabs.inc/docs/cl-sync/quickstart.md): Install CL Sync, define a collection and mutation, create a store, and wire everything into React in five steps. - [CL Sync Core Concepts: Store, Scope, and Outbox](https://claritylabs.inc/docs/cl-sync/concepts.md): Understand how CL Sync scopes data per user, manages collections, runs optimistic mutations, and survives page reloads with a durable outbox. - [SyncStore: The Central State Container](https://claritylabs.inc/docs/cl-sync/store.md): Create and configure a SyncStore, then use its methods to read, write, mutate, and subscribe to local-first sync state in your app. - [Defining Collections in CL Sync](https://claritylabs.inc/docs/cl-sync/collections.md): Define typed record sets with configurable persistence, query-key derivation, field redaction, and sort order for local-first sync. - [Durable Mutations and Optimistic Updates](https://claritylabs.inc/docs/cl-sync/mutations.md): Define durable mutations with optimistic local reducers, server flush functions, and ack/reject handlers for full control over sync state. - [Schema Migrations for Scoped Local Data](https://claritylabs.inc/docs/cl-sync/migrations.md): Write versioned migrations that run during hydrate() to rename fields, transform records, prune outbox entries, and evolve your local IndexedDB schema safely. - [SyncProvider: React Context for CL Sync](https://claritylabs.inc/docs/cl-sync/react/provider.md): Wrap your app with SyncProvider to hydrate the store on mount, register mutations for outbox replay, and expose sync state to all hooks. - [React Hooks for Local-First Sync](https://claritylabs.inc/docs/cl-sync/react/hooks.md): Use CL Sync's React hooks to reactively read collections, records, and sync status, and to dispatch durable optimistic mutations from any component. - [Using CL Sync with Convex](https://claritylabs.inc/docs/cl-sync/convex-adapter.md): Connect CL Sync to Convex real-time queries and mutations using defineConvexCollection, defineConvexMutation, and subscribeConvexCollection. - [CL Sync API Reference](https://claritylabs.inc/docs/cl-sync/reference.md): Complete API reference for all exports across @claritylabs/cl-sync, @claritylabs/cl-sync/react, and @claritylabs/cl-sync/convex. - [CL Pipelines: Typed Phase Runner for Durable AI Agents](https://claritylabs.inc/docs/cl-pipelines/index.md): Typed phase model with explicit checkpoints, per-phase retry modes, and crash-safe execution for long-running jobs and LLM agent loops. - [Quickstart: Run Your First CL Pipelines Job in Minutes](https://claritylabs.inc/docs/cl-pipelines/quickstart.md): Install cl-pipelines, define two phases, wire up in-memory adapters, and run a crash-safe pipeline end-to-end in under five minutes. - [CL Pipelines Core Concepts: Jobs, Phases, Checkpoints](https://claritylabs.inc/docs/cl-pipelines/concepts.md): Understand Jobs, Phases, Checkpoints, PipelineStatus, StorageAdapter, SchedulerAdapter, RetryMode, and PhaseResult before writing your first pipeline. - [Pipeline Lifecycle: runPipeline and advancePhase Explained](https://claritylabs.inc/docs/cl-pipelines/phase-runner/overview.md): Understand the full lifecycle of a pipeline run — from runPipeline seeding state to advancePhase executing each phase and writing checkpoints. - [How to Write Phases: PhaseContext, PhaseResult, saveState](https://claritylabs.inc/docs/cl-pipelines/phase-runner/phases.md): Learn the Phase shape, PhaseContext methods, PhaseResult variants, and how to use ctx.saveState for crash-safe mid-phase checkpointing. - [Checkpoints: When State Is Written, Cleared, and Resumed](https://claritylabs.inc/docs/cl-pipelines/phase-runner/checkpoints.md): Learn exactly when cl-pipelines writes, updates, and clears checkpoints, and how retryMode controls whether a resumed job loads or discards saved state. - [Retry Modes: Resume from Checkpoint vs Full Pipeline Reset](https://claritylabs.inc/docs/cl-pipelines/phase-runner/retry-modes.md): Understand when to use resume vs full retry mode, how each interacts with checkpoints, and how to expose the right retry action in your UI. - [Durable LLM Agent Loop: runAgent with Checkpointing](https://claritylabs.inc/docs/cl-pipelines/agent/overview.md): Use runAgent to run a crash-safe multi-turn LLM agent loop where each conversation turn is a durable pipeline phase with automatic checkpointing. - [Defining AI SDK Tools for the CL Pipelines Agent Loop](https://claritylabs.inc/docs/cl-pipelines/agent/tools.md): Define AI SDK v6 tools with inputSchema and execute, pass them to runAgent, and understand how tool results flow through the agent checkpoint. - [StorageAdapter and SchedulerAdapter Interface Reference](https://claritylabs.inc/docs/cl-pipelines/adapters/overview.md): Understand the StorageAdapter and SchedulerAdapter interfaces that connect cl-pipelines to your infrastructure, and use the in-memory adapters for testing. - [Connecting CL Pipelines to Convex Storage and Scheduler](https://claritylabs.inc/docs/cl-pipelines/adapters/convex.md): Step-by-step guide to connecting cl-pipelines to Convex using pipelineFields, createConvexStorageAdapter, and createConvexSchedulerAdapter. - [Headless UI Components for Pipeline Status and Retries](https://claritylabs.inc/docs/cl-pipelines/ui/overview.md): Ship pipeline status, progress logs, and retry buttons using headless React 18+ components from @claritylabs/cl-pipelines/ui with full styling control. - [StatusBanner, ProgressLog, and RetryButtons Reference](https://claritylabs.inc/docs/cl-pipelines/ui/components.md): Full prop reference for StatusBanner, ProgressLog, and RetryButtons — the headless React components from @claritylabs/cl-pipelines/ui. - [CL Pipelines Complete API Reference for All Exports](https://claritylabs.inc/docs/cl-pipelines/reference.md): Complete API reference for all exports in @claritylabs/cl-pipelines, @claritylabs/cl-pipelines/convex, and @claritylabs/cl-pipelines/ui.