$npx skillfedfor your agent

openai-harmony

OpenAI's response format for its open-weight model series gpt-oss

With conditionsPyPI Artificial IntelligenceReleased Nov 20257.2M downloads / moPlatform wheel

Decision gist · record as of 2026-08-14

platform wheels — openai_harmony-0.0.8-cp38-abi3-macosx_11_0_arm64.whl · openai_harmony-0.0.8-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl · openai_harmony-0.0.8-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
v0.0.8 · released 2025-11-05 · Python >=3.8 · 1 runtime deps: pydantic

Yes, if you are building a custom inference solution directly using gpt-oss models and need to handle the Harmony format yourself. No, if you are using gpt-oss through a managed API or inference provider—they handle formatting transparently. Caution: the package is aging (282 days since last release) and license terms are unclear; verify both before committing to production use.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python ≥3.8; compiled Rust extension must be available for your platform (wheels provided for common architectures).
  • Medium install friction due to compiled Rust bindings; prebuilt wheels cover common platforms (x86_64, ARM, i686, ppc64le on Linux/macOS/Windows).
  • Package is aging—last release was 282 days ago—so expect limited active maintenance.

License · maintenance · safety

(unclear) — License status is unclear; no SPDX identifier or raw license text is available in the metadata. Verify the actual license terms before using in proprietary or restricted contexts.

last release 2025-11-05 (282 days)

0 known vulnerabilities (OSV.dev, 2026-08-14) · 7,237,088 downloads/mo, #1,764 on PyPI

Verify before relying

pip install openai-harmony

from openai_harmony import (
    load_harmony_encoding,
    HarmonyEncodingName,
    Role,
    Message,
    Conversation,
    SystemContent,
)

enc = load_harmony_encoding(HarmonyEncodingName.HARMONY_GPT_OSS)
convo = Conversation.from_messages([
    Message.from_role_and_content(Role.SYSTEM, SystemContent.new()),
    Message.from_role_and_content(Role.USER, "Hello"),
])
tokens = enc.render_conversation_for_completion(convo, Role.ASSISTANT)
  • Whether the package is actively maintained or in maintenance-only mode (282 days since last release, status marked 'aging').
  • Actual license terms and any restrictions on commercial or derivative use.
  • Whether the harmony format is stable or subject to breaking changes in future gpt-oss model releases.
Same gist for agents: .md · .json

What it is and what it does

OpenAI Harmony is a Python library that encodes and decodes conversations in the Harmony response format, a structured format designed for OpenAI's open-weight gpt-oss models. The format enables models to output to multiple channels (analysis, commentary, final), handle chain-of-thought reasoning, and structure function calls with tool namespaces. The library wraps a Rust core via PyO3 bindings for performance, exposing a pure-Python API with dataclasses and helper functions.

You use it when building inference solutions that directly invoke gpt-oss models and need to format prompts and parse responses according to the Harmony specification. If you're using gpt-oss through an API provider (HuggingFace, Ollama, vLLM), the provider handles formatting and you don't need this library. The library depends only on Pydantic and aims to keep token sequences loss-free during rendering and parsing.

Use it for

  • Format multi-turn conversations with system, developer, and user roles for direct gpt-oss inference.
  • Parse structured model outputs including reasoning, commentary, and function calls from gpt-oss completions.
  • Define tool namespaces and function signatures in a format gpt-oss expects for reliable tool calling.
  • Encode conversations for token counting and prompt optimization before sending to a gpt-oss model.
  • Build a custom inference pipeline that requires explicit control over prompt and response formatting.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you are building a custom inference solution directly using gpt-oss models and need to handle the Harmony format yourself.

No, if you are using gpt-oss through a managed API or inference provider—they handle formatting transparently. Caution: the package is aging (282 days since last release) and license terms are unclear; verify both before committing to production use.

Install

openai-harmony on PyPI

Before you install

Medium install friction due to compiled Rust bindings; prebuilt wheels cover common platforms (x86_64, ARM, i686, ppc64le on Linux/macOS/Windows). Package is aging—last release was 282 days ago—so expect limited active maintenance.

Requires Python ≥3.8; compiled Rust extension must be available for your platform (wheels provided for common architectures).

License in practice

License status is unclear; no SPDX identifier or raw license text is available in the metadata. Verify the actual license terms before using in proprietary or restricted contexts.

Quickstart

pip install openai-harmony

from openai_harmony import (
    load_harmony_encoding,
    HarmonyEncodingName,
    Role,
    Message,
    Conversation,
    SystemContent,
)

enc = load_harmony_encoding(HarmonyEncodingName.HARMONY_GPT_OSS)
convo = Conversation.from_messages([
    Message.from_role_and_content(Role.SYSTEM, SystemContent.new()),
    Message.from_role_and_content(Role.USER, "Hello"),
])
tokens = enc.render_conversation_for_completion(convo, Role.ASSISTANT)

Verify before relying

  • Whether the package is actively maintained or in maintenance-only mode (282 days since last release, status marked 'aging').
  • Actual license terms and any restrictions on commercial or derivative use.
  • Whether the harmony format is stable or subject to breaking changes in future gpt-oss model releases.

Package facts

LicenseNot declared unclear
Python supportSupports the current Python release >=3.8
Install frictionMedium. Platform-specific wheel
Runtime dependencies
1 package
pydantic
MaintenanceAging 282 days since the last release
First released
Downloads7,237,088 / month, #1,764 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyProgramming Language :: Rust

Evidence: openai_harmony-0.0.8-cp38-abi3-macosx_11_0_arm64.whl; openai_harmony-0.0.8-cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl; openai_harmony-0.0.8-cp38-abi3-manylinux_2_17_armv7l.manylinux2014_armv7l.whl; openai_harmony-0.0.8-cp38-abi3-manylinux_2_17_i686.manylinux2014_i686.whl; openai_harmony-0.0.8-cp38-abi3-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl; openai_harmony-0.0.8-cp38-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl; openai_harmony-0.0.8-cp38-abi3-musllinux_1_2_aarch64.whl; openai_harmony-0.0.8-cp38-abi3-musllinux_1_2_armv7l.whl; openai_harmony-0.0.8-cp38-abi3-musllinux_1_2_i686.whl; openai_harmony-0.0.8-cp38-abi3-musllinux_1_2_x86_64.whl; openai_harmony-0.0.8-cp38-abi3-win32.whl; openai_harmony-0.0.8-cp38-abi3-win_amd64.whl

Tags

Capabilities
gpt-oss harmony formatopenai response format parsingstructured conversation encodingfunction call formattingchain of thought renderingllm prompt formattingharmony tokenization
Topics
llm-inferenceprompt-formattingrust-binding

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “gpt-oss harmony format”

  • openai-harmonyRenders and parses the Harmony response format used by OpenAI's…
  • gpt-ossProvides reference implementations for running OpenAI's gpt-oss-120b…
  • aioharmonyaioharmony is an asyncio library for programmatically controlling…

Give your agent the search over MCP, or paste the wish link into any chat.

More Artificial Intelligence packages

litellm With conditions
PyPI · Artificial Intelligence · released Aug 2026

LiteLLM provides a unified Python interface to call 100+ LLM providers (OpenAI, Anthropic, Gemini, Bedrock, Azure, and others) using OpenAI-compatible API format, available as both a Python SDK and a self-hosted AI Gateway proxy server.

Install it if you need to work with multiple LLM providers or want to centralize LLM routing in your organization.

MITcompiled wheel
682.8Mdownloads / mo
huggingface-hub Worth it
PyPI · Artificial Intelligence · released Aug 2026

Client library and CLI tool for downloading, uploading, and managing models, datasets, and repositories on the Hugging Face Hub platform.

Install it if you work with Hugging Face Hub models or datasets.

Apache-2.0pure Python · 3.10.0+
442.4Mdownloads / mo
langchain Worth it
PyPI · Python Modules · released Aug 2026

LangChain provides a framework for building agents and LLM-powered applications by composing language models, tools, and memory through a unified API that abstracts over multiple model providers.

MITpure Python
315.4Mdownloads / mo
hf-xet With conditions
PyPI · Artificial Intelligence · released Aug 2026

hf-xet provides chunk-based deduplication and efficient file transfer for the Hugging Face Hub, enabling faster uploads and downloads of large files with local disk caching.

Apache-2.0compiled wheel · 3.8+
258.4Mdownloads / mo
tokenizers Worth it
PyPI · Artificial Intelligence · released Apr 2026

Tokenizers converts raw text into token sequences for NLP models, with support for training custom vocabularies and using pre-built tokenizers (BPE, WordPiece) optimized for speed via Rust.

Apache-2.0compiled wheel · 3.10+
222.9Mdownloads / mo
transformers Worth it
PyPI · Artificial Intelligence · released Aug 2026

Transformers provides a unified framework for loading, fine-tuning, and running state-of-the-art pretrained models across text, vision, audio, video, and multimodal tasks using PyTorch, JAX, or TensorFlow.

Install it if you need to run or train any transformer-based model for NLP, vision, audio, or multimodal tasks.

permissive licensepure Python · 3.10.0+
186.6Mdownloads / mo

See also gpt-oss · openai-messages-token-helper · cohere-melody · composio-openai · openai-whisper · openai · llama-index-llms-openai · openai-chatkit · agent-framework-openai · llm-openai-plugin