D-ID Client SDK - v3.0.0-0
    Preparing search index...

    Interface Agent

    An agent's profile, as the Agents API returns it.

    The SDK fetches it once while createAgentManager runs and exposes it as AgentManager.agent, so everything here is available before connect() — which is what makes it useful for rendering the agent before the video exists. The fields are the agent's configuration, whether it was set in D-ID Studio or through the Agents API; most of them are for the application to use, and each one below says where the SDK itself reads it.

    interface Agent {
        access?: "public";
        advanced_settings?: {
            closed_captions_enabled?: boolean;
            ui_debug_mode?: boolean;
        };
        avatar: AgentAvatar;
        end_of_call_feedback?: EndOfCallFeedbackConfig;
        greetings?: string[];
        id: string;
        idle_video?: string;
        knowledge?: { embedder?: { is_limited_language?: boolean }; id: string };
        ld_context?: { hash_key: string; key: string; plan_group: string };
        name?: string;
        owner_id?: string;
        starter_message?: string[];
        thumbnail?: string;
        triggers_available?: boolean;
        vision?: { enabled: boolean };
    }
    Index
    access?: "public"

    'public' when the agent is configured for public access; omitted otherwise.

    advanced_settings?: {
        closed_captions_enabled?: boolean;
        ui_debug_mode?: boolean;
    }

    Settings that change how D-ID's own surfaces present the agent.

    Type Declaration

    • Optionalclosed_captions_enabled?: boolean

      Whether the embedding UI should show closed captions. The SDK does not act on it.

    • Optionalui_debug_mode?: boolean

      Whether the SDK logs its streaming lifecycle to the browser console.

      When it is enabled the SDK turns debug logging on for every visitor, whatever debug was passed to createAgentManager.

    avatar: AgentAvatar

    The avatar the agent is built on.

    Its type is the single most important field on an agent: it decides which transport the session uses and therefore which SDK features work. See AgentAvatar.

    end_of_call_feedback?: EndOfCallFeedbackConfig

    The end-of-call feedback form configured for the agent.

    The SDK does not read it: render your own form from it and submit the result with submitFeedback(). See EndOfCallFeedbackConfig.

    greetings?: string[]

    The greeting lines configured for the agent.

    The SDK never speaks them by itself: pass one to speak() once the agent is connected if you want the agent to open the conversation. Check what your own agent does first — an Expressive (V4) session's server side may greet on its own, in which case speaking a greeting as well says it twice.

    id: string

    Id of the agent: the same value passed to createAgentManager.

    idle_video?: string

    URL of the agent's looping idle video.

    Show it while the agent is not speaking: put it on your video element's src when onVideoStateChange reports STOP.

    knowledge?: { embedder?: { is_limited_language?: boolean }; id: string }

    The knowledge base attached to the agent, when it has one.

    Its presence is what tells you the agent can cite sources; the citations themselves arrive on each answer as matches.

    Type Declaration

    • Optionalembedder?: { is_limited_language?: boolean }

      The embedding model the knowledge base was indexed with. The SDK does not act on it.

      • Optionalis_limited_language?: boolean

        Whether that embedding model covers only a limited set of languages, so knowledge written in another language may not be retrieved well.

    • id: string

      Id of the knowledge base.

      The SDK sends it with every rating made by rate(), and it is the knowledge_id of the citations on an answer.

    ld_context?: { hash_key: string; key: string; plan_group: string }

    Feature-flag targeting context for the account this agent belongs to.

    Used by D-ID's own applications; not part of the SDK contract and may change without notice.

    Type Declaration

    • hash_key: string

      Hashed form of the key.

    • key: string

      Key identifying the context.

    • plan_group: string

      The plan group the account falls into.

    name?: string

    The agent's display name.

    owner_id?: string

    Id of the D-ID account that owns the agent. Set by the Agents API.

    starter_message?: string[]

    Suggested opening questions to offer the user.

    The SDK surfaces the same array as starterMessages.

    thumbnail?: string

    URL of the agent's still image. Use it as the poster of your video element before connect() has a stream to show.

    triggers_available?: boolean

    Whether the agent has triggers configured. The SDK does not act on them.

    vision?: { enabled: boolean }

    Whether vision is enabled for the agent.

    Exposed so an application can decide whether to offer the camera; the SDK does not read it, and publishing a camera stream is an Expressive (V4) feature — see publishCameraStream().

    Type Declaration

    • enabled: boolean

      true when the agent is configured to use the user's camera.