HarnessRouter Community Edition: the self-hosted, Apache-2.0 edition of the unified interface for agent harnesses. Run Codex, Claude Code, Hermes, PI, DSH, and more through one API, with sessions, streaming, files, cancellation, and failure handling. Implements the Unified Harness Protocol (UHP), an open standard. Your keys, your infrastructure.
Python agent-apiagent-frameworkagent-harnessai-agentsai-infrastructurecoding-agentconformance-testingdeepseek-harnessharness-engineeringhermesllmopen-protocolopen-sourceopen-standardpi-coding-agentself-hosteduhpunified-apiunified-harness-protocolunified-interface
{"type": "session", "version": 3, "id": "01a0de42-e1f0-7251-9392-892edec68750", "timestamp": "2026-09-26T15:08:40.305Z", "cwd": "/tmp/tmpbe4srrt2"}
{"type": "agent_start"}
{"type": "turn_start"}
{"type": "message_start", "message": {"role": "user", "content": [{"type": "text", "text": "Say where the file is."}], "timestamp": 1790435320345}}
{"type": "message_end", "message": {"role": "user", "content": [{"type": "text", "text": "Say where the file is."}], "timestamp": 1790435320345}}
{"type": "message_start", "message": {"role": "assistant", "content": [{"type": "text", "text": "The file is saved as Rep"}], "api": "openai-completions", "provider": "hr", "model": "test-model", "usage": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "totalTokens": 0, "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 0}}, "stopReason": "pending", "timestamp": 1790435320353, "responseId": "x"}}
{"type": "message_update", "usage": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "totalTokens": 0, "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 0}}, "assistantMessageEvent": {"type": "text_start", "contentIndex": 0}}
{"type": "message_update", "usage": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "totalTokens": 0, "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 0}}, "assistantMessageEvent": {"type": "text_delta", "contentIndex": 0, "delta": "The file is saved as Rep"}}
{"type": "message_update", "usage": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "totalTokens": 0, "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 0}}, "assistantMessageEvent": {"type": "text_end", "contentIndex": 0, "content": "The file is saved as Rep"}}
{"type": "message_end", "message": {"role": "assistant", "content": [{"type": "text", "text": "The file is saved as Rep"}], "api": "openai-completions", "provider": "hr", "model": "test-model", "usage": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "totalTokens": 0, "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 0}}, "stopReason": "error", "timestamp": 1790435320353, "responseId": "x", "errorMessage": "Stream ended without finish_reason"}}
{"type": "turn_end", "message": {"role": "assistant", "content": [{"type": "text", "text": "The file is saved as Rep"}], "api": "openai-completions", "provider": "hr", "model": "test-model", "usage": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "totalTokens": 0, "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 0}}, "stopReason": "error", "timestamp": 1790435320353, "responseId": "x", "errorMessage": "Stream ended without finish_reason"}, "toolResults": []}
{"type": "agent_end", "messages": [{"role": "user", "content": [{"type": "text", "text": "Say where the file is."}], "timestamp": 1790435320345}, {"role": "assistant", "content": [{"type": "text", "text": "The file is saved as Rep"}], "api": "openai-completions", "provider": "hr", "model": "test-model", "usage": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "totalTokens": 0, "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 0}}, "stopReason": "error", "timestamp": 1790435320353, "responseId": "x", "errorMessage": "Stream ended without finish_reason"}], "willRetry": true}
{"type": "auto_retry_start", "attempt": 1, "maxAttempts": 3, "delayMs": 2000, "errorMessage": "Stream ended without finish_reason"}
{"type": "agent_start"}
{"type": "turn_start"}
{"type": "message_start", "message": {"role": "assistant", "content": [], "api": "openai-completions", "provider": "hr", "model": "test-model", "usage": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "totalTokens": 0, "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 0}}, "stopReason": "pending", "timestamp": 1790435322378}}
{"type": "message_update", "usage": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "totalTokens": 0, "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 0}}, "assistantMessageEvent": {"type": "text_start", "contentIndex": 0}}
{"type": "message_update", "usage": {"input": 20, "output": 5, "cacheRead": 0, "cacheWrite": 0, "reasoning": 0, "totalTokens": 25, "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 0}}, "assistantMessageEvent": {"type": "text_delta", "contentIndex": 0, "delta": "The file is saved as Rep"}}
{"type": "message_update", "usage": {"input": 20, "output": 5, "cacheRead": 0, "cacheWrite": 0, "reasoning": 0, "totalTokens": 25, "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 0}}, "assistantMessageEvent": {"type": "text_delta", "contentIndex": 0, "delta": "ort.pdf"}}
{"type": "message_update", "usage": {"input": 20, "output": 5, "cacheRead": 0, "cacheWrite": 0, "reasoning": 0, "totalTokens": 25, "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 0}}, "assistantMessageEvent": {"type": "text_end", "contentIndex": 0, "content": "The file is saved as Report.pdf"}}
{"type": "message_end", "message": {"role": "assistant", "content": [{"type": "text", "text": "The file is saved as Report.pdf"}], "api": "openai-completions", "provider": "hr", "model": "test-model", "usage": {"input": 20, "output": 5, "cacheRead": 0, "cacheWrite": 0, "reasoning": 0, "totalTokens": 25, "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 0}}, "stopReason": "stop", "timestamp": 1790435322378, "responseId": "x", "rawStopReason": "stop"}}
{"type": "auto_retry_end", "success": true, "attempt": 1}
{"type": "turn_end", "message": {"role": "assistant", "content": [{"type": "text", "text": "The file is saved as Report.pdf"}], "api": "openai-completions", "provider": "hr", "model": "test-model", "usage": {"input": 20, "output": 5, "cacheRead": 0, "cacheWrite": 0, "reasoning": 0, "totalTokens": 25, "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 0}}, "stopReason": "stop", "timestamp": 1790435322378, "responseId": "x", "rawStopReason": "stop"}, "toolResults": []}
{"type": "agent_end", "messages": [{"role": "assistant", "content": [{"type": "text", "text": "The file is saved as Report.pdf"}], "api": "openai-completions", "provider": "hr", "model": "test-model", "usage": {"input": 20, "output": 5, "cacheRead": 0, "cacheWrite": 0, "reasoning": 0, "totalTokens": 25, "cost": {"input": 0, "output": 0, "cacheRead": 0, "cacheWrite": 0, "total": 0}}, "stopReason": "stop", "timestamp": 1790435322378, "responseId": "x", "rawStopReason": "stop"}], "willRetry": false}
{"type": "agent_settled"}