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
  • 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
  • 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 ModelsLlmsProfileLoadSerializableMemoryMessagesToolOutput ParsersOpenai FunctionsOpenai ToolsOutputsPrompt ValuesPromptsRetrieversDocument CompressorsRunnablesGraphSingletonsStoresStructured QueryToolsBaseConsoleLog StreamRun CollectorTracer LangchainStreamAsync CallerChunk ArrayContextEnvEvent Source ParseFormatFunction CallingHashJson PatchJson SchemaMathSsrfStreamTestingTiktokenTypesVectorstores
Text Splitters
MCP Adapters
Language
Theme
JavaScript@langchain/coremessagesStandardMessageStructure
Interface●Since v1.0

StandardMessageStructure

Standard message structured used to define the most basic message structure that's used throughout the library.

This is also the message structure that's used when a message structure is not provided.

Copy
interface StandardMessageStructure

Bases

MessageStructure

Properties

property
content: __type

Array of content blocks that make up the message content

property
outputVersion: MessageOutputVersion
property
properties: __type

Optional mapping of message types to arbitrary property objects. Allows attaching custom metadata or other information to specific message types.

property
tools: MessageToolSet

Optional set of tool definitions that can be used in messages. Each tool is defined with input/output types and can be referenced in tool messages.

Inherited fromMessageStructure

Properties

Pcontent: TStructure["outputVersion"] extends "v1" ? $InferMessageContentBlocks<TStructure, "ai">[] : string | ContentBlock | Text[]
—

Array of content blocks that make up the message content

PoutputVersion: MessageOutputVersionPproperties: Partial<__type>
—

Optional mapping of message types to arbitrary property objects.

Ptools: TTools
—

Optional set of tool definitions that can be used in messages.

View source on GitHub