nutrient-ai-assistant

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Nutrient AI Assistant

Nutrient AI Assistant

In-viewer document-AI feature for Nutrient client SDKs (Web, iOS, Android, React Native) backed by a Docker service. Users chat with the open document for Q&A, summarisation, translation, redaction, and form filling; from Q1 2026 onward an agents layer plans and executes multi-step edits autonomously under policy-defined approval gates.
面向Nutrient客户端SDK(Web、iOS、Android、React Native)的内嵌式文档AI功能,由Docker服务提供后端支持。用户可与打开的文档进行聊天问答、摘要生成、翻译、脱敏、表单填充操作;2026年第一季度起,将新增agents层,可在策略定义的审批机制下自主规划并执行多步骤编辑任务。

Documentation

文档

Single-fetch LLM-curated dumps — prefer these over the human-shaped docs site for API/guide look-ups:
由LLM整理的单源获取文档——进行API/指南查询时,优先使用以下链接,而非人工维护的文档站点:

Key Concepts

核心概念

  • Architecture: a Docker container (
    pspdfkit/ai-assistant
    , also at
    public.ecr.aws/pspdfkit/ai-assistant
    ) plus a PostgreSQL database with the
    pgvector
    extension, plus credentials for an LLM provider (OpenAI / Azure OpenAI / AWS Bedrock / self-hosted OpenAI-compatible). The legacy
    pspdfkit/ai-document-assistant
    image is the pre-rebrand name; new deployments use
    pspdfkit/ai-assistant
    .
  • Client integration: existing Nutrient SDKs (Web / iOS / Android / React Native) — nothing extra to install; configure an
    aiAssistant
    block (Web) or an
    AIAssistantConfiguration
    on
    PDFConfiguration
    (iOS / Android / React Native), and add the
    ai-assistant
    toolbar item (Web) or
    aiAssistantButtonItem
    (mobile).
  • Current names: toolbar item
    ai-assistant
    ; Web config block
    aiAssistant
    . The legacy
    ai-document-assistant
    /
    aiDocumentAssistant
    keys predate the rebrand — current docs and examples use the new names.
  • Required env vars on the backend:
    ACTIVATION_KEY
    ,
    API_AUTH_TOKEN
    ,
    JWT_PUBLIC_KEY
    , plus one LLM-provider credential (
    OPENAI_API_KEY
    /
    AZURE_API_KEY
    /
    BEDROCK_ACCESS_KEY_ID
    +
    BEDROCK_SECRET_ACCESS_KEY
    ).
  • Two-JWT pattern: when the client SDK is paired with Nutrient Document Engine, the browser sends one JWT to the engine (
    authPayload.jwt
    ) and a different JWT to AI Assistant (
    aiAssistant.jwt
    ). They're signed with different keys, scoped differently, and shouldn't be reused.
  • Standalone vs paired: AI Assistant does not require Nutrient Document Engine. Standalone (WASM-only Web SDK) and paired (server-backed against Document Engine for collaborative storage, Nutrient Instant) are both first-class.
  • 架构:一个Docker容器(
    pspdfkit/ai-assistant
    ,也可从
    public.ecr.aws/pspdfkit/ai-assistant
    获取),搭配带有
    pgvector
    扩展的PostgreSQL数据库,以及LLM服务商的凭证(OpenAI / Azure OpenAI / AWS Bedrock / 兼容OpenAI的自托管模型)。旧版
    pspdfkit/ai-document-assistant
    镜像是更名前的名称;新部署请使用
    pspdfkit/ai-assistant
    。
  • 客户端集成:现有Nutrient SDK(Web / iOS / Android / React Native)无需额外安装;在Web端配置
    aiAssistant
    块,或在iOS / Android / React Native端的
    PDFConfiguration
    上设置
    AIAssistantConfiguration
    ,并添加
    ai-assistant
    工具栏项(Web)或
    aiAssistantButtonItem
    (移动端)。
  • 当前命名:工具栏项为
    ai-assistant
    ;Web端配置块为
    aiAssistant
    。旧版
    ai-document-assistant
    /
    aiDocumentAssistant
    为更名前的键名——当前文档和示例均使用新名称。
  • 后端必填环境变量:
    ACTIVATION_KEY
    、
    API_AUTH_TOKEN
    、
    JWT_PUBLIC_KEY
    ,以及至少一个LLM服务商凭证(
    OPENAI_API_KEY
    /
    AZURE_API_KEY
    /
    BEDROCK_ACCESS_KEY_ID
    +
    BEDROCK_SECRET_ACCESS_KEY
    )。
  • 双JWT模式:当客户端SDK与Nutrient Document Engine搭配使用时,浏览器会向引擎发送一个JWT(
    authPayload.jwt
    ),向AI Assistant发送另一个不同的JWT(
    aiAssistant.jwt
    )。两者使用不同密钥签名,作用域不同,不可复用。
  • 独立运行 vs 搭配使用:AI Assistant无需依赖Nutrient Document Engine。独立运行(仅WASM的Web SDK)和搭配运行(基于Document Engine后端,支持协作存储、Nutrient Instant)均为一等方案。