langchain.js
    Preparing search index...

    Type Alias InferAgentResponse<T>

    InferAgentResponse: InferAgentType<T, "Response">

    Shorthand helper to extract the Response type from an AgentTypeConfig or ReactAgent.

    Type Parameters

    • T
    const agent = createAgent({ responseFormat: z.object({ name: z.string() }), ... });
    type Response = InferAgentResponse<typeof agent>; // { name: string }