omarkamali/harmony-inspector
1
Harmony Inspector
Deep inspection and visualization of OpenAI harmony-formatted conversations.
What is this?
Harmony Inspector is a tool for visualizing and debugging harmony-formatted conversations - the response format used by OpenAI's open-weight gpt-oss models.
Features
- Visual token inspection - Color-coded display of harmony tokens with semantic highlighting
- Message parsing - Extract structured messages from harmony text
- Split view - Side-by-side visualization with synchronized hover
- Tooltips - Hover over any token to understand its purpose
- Error detection - Identify parsing issues with helpful suggestions
- Debug mode - Step through parser state transitions
What is Harmony Format?
Harmony is a structured format that encodes conversations between users and AI assistants. It uses special tokens to mark message boundaries, roles, channels, and other metadata:
<|start|>- Begins a new message<|message|>- Separates header from content<|end|>- Ends a message<|channel|>- Specifies output channel<|constrain|>- Sets content type<|call|>- Signals a function call<|return|>- Signals end of response
Example
<|start|>user<|message|>Hello!<|end|><|start|>assistant<|channel|>final<|message|>Hi there!<|end|>Local Development
# Clone the repository
git clone https://github.com/your-repo/harmony-inspector
cd harmony-inspector
# Create virtual environment
python3 -m venv .venv
source .venv/bin/activate
# Build the harmony submodule
cd harmony
pip install maturin pydantic
maturin develop
cd ..
# Install harmony-inspector
pip install -e .
# Run the server
uvicorn harmony_inspector.web.app:app --reloadOpen http://localhost:8000 in your browser.
License
MIT License
Author
Created by Omar Kamali at Omneity Labs
Built with openai_harmony
