AI & LLM
Chat Conversation History JSON Example
A JSON example of an LLM chat conversation — an ordered messages array with system, user, and assistant roles. Copy-ready for chatbots, agent memory, and prompt construction.
Field Reference
messagesrequiredarray<object>Ordered turns; the model reads the whole array as context each callmessages[].rolerequiredstringWho sent the turn: system, user, assistant (or tool)messages[].contentrequiredstring | arrayTurn content — text, or content blocks for images/tool resultsconversationIdoptionalstringYour id for persisting and resuming the threadmodeloptionalstringModel used for the thread; helps when re-sending historyVariants
Multimodal user turnA user message mixing text and an image (vision models).
Summarized memoryTo stay under the context limit, old turns are compressed into a running summary.
Common Use Cases
- →Persisting and replaying chatbot conversations across sessions
- →Implementing agent memory with summarization to fit the context window
- →Building prompt payloads for the OpenAI or Anthropic chat APIs
chatconversationmessagesmemorychatbotllm
Validate or format this JSON
One click loads this exact example into the tool — no copy-paste needed. Format it, validate it, explore the tree, or generate TypeScript types instantly.
Frequently Asked Questions
Related JSON Examples
AI & LLMOpenAI Chat Completion ResponseOpenAI Chat Completions API response with choices, message, finish_reason, and usage.AI & LLMAnthropic Claude Messages ResponseClaude Messages API response with content blocks, stop_reason, and token usage.AI & LLMAI Agent Run TraceAgent run with goal, reasoning steps, tool calls, observations, and final output.