model-harness vs Pi
Agent harnesses for .NET and TypeScript compared
model-harness and Pi both provide frameworks for building and customizing AI agents. model-harness focuses on controlling an agent loop in .NET, while Pi centers on a customizable TypeScript coding-agent CLI and related libraries.

model-harness: Build Controllable AI Agents for .NET
Model Harness is a ports-and-adapters agent framework for .NET 8 and .NET 10. It combines a model with a configurable loop, context-shaping guides, and sensors that can intervene at defined steps.

Pi: Build and Customize a Coding Agent
Pi is a minimal, extensible coding-agent harness built with TypeScript and its pi-ai unified LLM API. Run it as a CLI on macOS, Linux, or Windows, or adapt its components and extensions to your own workflows.
| model-harness | Pi | |
|---|---|---|
| Language | C# | TypeScript |
| License | MIT | MIT |
| Stars | 1 | 117k |
| Forks | 1 | 15k |
| Last analyzed | Nov 20, 2026 | Oct 23, 2026 |
Key differences
- model-harness is written in C# for .NET 8 and .NET 10; Pi is written in TypeScript and requires Node.js 22.19 or newer.
- model-harness emphasizes loop control through context-shaping guides, sensors, and turn, token, cost, and time budgets. Pi emphasizes coding workflows, with interactive, scripted, JSON, RPC, and SDK-based use.
- model-harness offers optional adapters for Anthropic, Azure OpenAI / AI Foundry, and Ollama. Pi uses its pi-ai unified LLM API, which includes providers such as OpenAI, Anthropic, and Google.
- model-harness lists sub-agents as an option; Pi explicitly leaves out built-in sub-agents and plan mode, requiring customization or a package for those capabilities.
- Both projects use the MIT license. Pi has a larger contributor base and substantially more stars and forks, while model-harness is young and its measured contributor activity is concentrated in one person.
- Pi provides installers for macOS, Linux, and Windows. model-harness is a .NET framework whose application must configure a model client.
Choose model-harness if you…
- need explicit control over context, agent-loop checks, and run budgets in a .NET application.
- want optional checkpointing, human approval, sub-agents, or tracing in an agent workflow.
- plan to connect a custom model client or use one of its listed adapters.
Choose Pi if you…
- want an interactive coding-agent CLI for work in a project directory.
- need scripting, structured JSON output, RPC control, or a TypeScript SDK for integrations.
- want to customize agent workflows with extensions, skills, themes, or packages.
Compare the numbers side by side, or add more projects
This comparison is generated with AI from the OSRepos analyses of both projects. Always check each project's repository and documentation before choosing.