OpenHarness
A composable, open-source TypeScript SDK for building powerful AI agent harnesses with stateless primitives, middleware, and hierarchical subagents on any model provider.
At a Glance
Fully free and open-source under the MIT License. Use, modify, and distribute freely.
Engagement
Available On
Alternatives
Listed May 2026
About OpenHarness
OpenHarness is an open-source TypeScript SDK built by MaxGfeller for constructing capable, general-purpose AI agents in code. It is built on top of Vercel's AI SDK and draws inspiration from Claude Code, Codex, and similar agent harnesses. The project is MIT-licensed and available on GitHub, with documentation hosted at docs.open-harness.dev.
What It Is
OpenHarness is a code-first agent framework that provides composable primitives for building Claude Code-like products. Rather than offering a high-level abstraction that hides implementation details, it exposes clean TypeScript APIs — stateless agents, composable middleware, hierarchical subagents, and context compaction — giving developers full control over message history and execution flow. It targets any Node.js or edge runtime and works with any model provider supported by Vercel AI SDK, including OpenAI, Anthropic, and Google.
Core Architecture
The SDK is organized as a monorepo of focused packages:
@openharness/core— The main package covering Agent, Session, Conversation, middleware, tools, and UI stream integration@openharness/provider-chatgpt— An experimental OAuth model provider for ChatGPT/Codex subscription-backed local harnesses@openharness/provider-vfs— A virtual filesystem provider for sandboxed, in-memory, or SQLite-backed file access@openharness/react— React hooks and provider for AI SDK 5 chat UIs@openharness/vue— Vue 3 composables and provider for AI SDK 5 chat UIs
Agents are stateless executors: message history is a plain array that can be inspected, modified, or shared between agents. Sessions layer on top to handle multi-turn conversations, context compaction, retry, and persistence.
Composable Middleware and Tooling
OpenHarness uses a middleware pattern that lets developers mix and match capabilities without coupling them. Built-in middleware includes turn tracking, retry logic, and two-phase context compaction (pruning old tool results, then LLM-powered summarization). Tool permissions are handled via async approval callbacks that work in CLI prompts, web modals, or external services. Built-in tools include filesystem access (createFsTools) and bash execution (createBashTool), with support for custom tools and Model Context Protocol (MCP) server connections via stdio, HTTP, or SSE transport.
Subagents and Advanced Features
The framework supports hierarchical subagent delegation, where child agents can be spawned for specialized tasks. The project page notes that subagents support dynamic catalogs resolved at run time, resumable sessions, and background runs with separate run and session IDs. Skills (on-demand SKILL.md instruction packages) and automatic AGENTS.md/CLAUDE.md project context injection are also supported.
Update: @openharness/provider-chatgpt v0.1.1
The latest release, @openharness/provider-chatgpt@0.1.1, was published on April 24, 2026. The repository was created in February 2026 and has accumulated 527 stars and 91 forks according to the GitHub project page. Active development is ongoing, with the main branch last pushed in April 2026. The project ships example applications for CLI agents, Next.js streaming chat, and Nuxt streaming chat to help developers get started quickly.
Community Discussions
Be the first to start a conversation about OpenHarness
Share your experience with OpenHarness, ask questions, or help others learn from your insights.
Pricing
Open Source
Fully free and open-source under the MIT License. Use, modify, and distribute freely.
- Full access to all packages
- MIT License
- Community support via GitHub
- All core, provider, and UI packages included
Capabilities
Key Features
- Stateless agent primitives with full message history control
- Composable middleware (turn tracking, retry, compaction, persistence)
- Hierarchical subagent delegation with background execution
- Two-phase context compaction (pruning + LLM summarization)
- Async tool permission approval callbacks
- Built-in filesystem and bash tools
- MCP server integration (stdio, HTTP, SSE)
- Skills and AGENTS.md/CLAUDE.md project context injection
- React hooks and Vue 3 composables for streaming UIs
- Multi-turn sessions with compaction and retry
- Virtual filesystem provider (in-memory, SQLite-backed)
- Experimental ChatGPT/Codex OAuth model provider
- Any model provider via Vercel AI SDK
