langchain.js
    Preparing search index...

    Type Alias InferAgentStateSchema<T>

    InferAgentStateSchema: InferAgentType<T, "State">

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

    For the complete merged state (what invoke returns), use InferAgentState.

    Type Parameters

    • T
    const agent = createAgent({ stateSchema: mySchema, ... });
    type Schema = InferAgentStateSchema<typeof agent>;