2025-08-06 - https://cookbook.openai.com/articles/openai-harmony
The OpenAI Harmony Response Format is a structured message format designed for conversation management, reasoning output, and function call structuring, especially for the gpt-oss models. It defines distinct message roles (system, developer, user, assistant, tool) and message channels (final, analysis, commentary) to separate response types and ensure appropriate handling. The format uses special tokens to structure messages and supports multi-channel outputs, chain-of-thought reasoning, and function calling with strict schema definitions. There is also a recommended Harmony renderer library for ease of use, and detailed guidance on constructing prompts, tool definitions, handling tool calls, and managing reasoning output. Additionally, it includes definitions for built-in tools such as browsing and Python code execution aids to enhance model functionality. This format ensures consistent, hierarchical, and extensible interaction patterns for advanced AI conversation and function execution.