langchain.js
    Preparing search index...

    Type Alias InferAgentContextSchema<T>

    InferAgentContextSchema: InferAgentType<T, "Context">

    Shorthand helper to extract the raw Context schema type from an AgentTypeConfig or ReactAgent. This returns just the contextSchema type passed to createAgent, not merged with middleware.

    For the complete merged context (agent context + middleware contexts), use InferAgentContext.

    Type Parameters

    • T
    const agent = createAgent({ contextSchema: myContextSchema, ... });
    type Schema = InferAgentContextSchema<typeof agent>;