LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
LangChain
  • Universal
  • Hub
  • Node
  • Load
  • Serializable
  • Encoder Backed
  • File System
  • In Memory
LangChain Core
  • Agents
  • Caches
  • Base
  • Dispatch
  • Web
  • Manager
  • Promises
  • Chat History
  • Context
  • Base
  • Langsmith
  • Documents
  • Embeddings
  • Errors
  • Example Selectors
  • Indexing
  • Base
  • Chat Models
  • Llms
  • Profile
  • Structured Output
  • Load
  • Serializable
  • Memory
  • Messages
  • Tool
  • Output Parsers
  • Openai Functions
  • Openai Tools
  • Outputs
  • Prompt Values
  • Prompts
  • Retrievers
  • Document Compressors
  • Runnables
  • Graph
  • Singletons
  • Stores
  • Structured Query
  • Tools
  • Base
  • Console
  • Log Stream
  • Run Collector
  • Tracer Langchain
  • Stream
  • Async Caller
  • Chunk Array
  • Context
  • Env
  • Event Source Parse
  • Format
  • Function Calling
  • Hash
  • Json Patch
  • Json Schema
  • Math
  • Ssrf
  • Standard Schema
  • Stream
  • Testing
  • Tiktoken
  • Types
  • Vectorstores
Text Splitters
MCP Adapters
⌘I

LangChain Assistant

Ask a question to get started

Enter to send•Shift+Enter new line

Menu

LangChain
UniversalHubNodeLoadSerializableEncoder BackedFile SystemIn Memory
LangChain Core
AgentsCachesBaseDispatchWebManagerPromisesChat HistoryContextBaseLangsmithDocumentsEmbeddingsErrorsExample SelectorsIndexingBaseChat ModelsLlmsProfileStructured OutputLoadSerializableMemoryMessagesToolOutput ParsersOpenai FunctionsOpenai ToolsOutputsPrompt ValuesPromptsRetrieversDocument CompressorsRunnablesGraphSingletonsStoresStructured QueryToolsBaseConsoleLog StreamRun CollectorTracer LangchainStreamAsync CallerChunk ArrayContextEnvEvent Source ParseFormatFunction CallingHashJson PatchJson SchemaMathSsrfStandard SchemaStreamTestingTiktokenTypesVectorstores
Text Splitters
MCP Adapters
Language
Theme
JavaScript@langchain/coreutilsstandard_schema
Moduleā—Since v1.1

utils/standard_schema

Copy
import { ... } from "@langchain/core/utils/standard_schema";

Functions

function
isSerializableSchema→ schema is SerializableSchema<Input, Output>

Type guard for Standard Schema V1. Returns true if the value has a ~standard.validate interface, indicating it can validate unknown values at runtime (e.g. for parsing LLM output).

function
isStandardJsonSchema→ schema is StandardJSONSchemaV1<Input, Output>

Type guard for Standard JSON Schema V1. Returns true if the value has a ~standard.jsonSchema interface, indicating it can be converted to a JSON Schema object (e.g. for sending as a tool definition to an LLM).

function
isStandardSchema→ schema is StandardSchemaV1<Input, Output>

Type guard for Standard Schema V1. Returns true if the value has a ~standard.validate interface, indicating it can validate unknown values at runtime (e.g. for parsing LLM output).

Type Aliases

typeAlias
SerializableSchema: StandardSchemaV1<Input, Output> & StandardJSONSchemaV1<Input, Output>

A schema that supports both runtime validation and JSON Schema generation. Any schema passed to withStructuredOutput must satisfy both interfaces.

View source on GitHub