agent-harness: Use Coding Agents from Rust Applications

Summary
A Rust framework that gives multiple coding agents a shared interface and typed event stream. Use it to embed agent runs in applications without writing separate output parsers for each provider or CLI.
At a glance
- Language
- Rust
- License
- Apache-2.0
- Stars
- 1
- Forks
- 0
- Added to OSRepos
- October 5, 2026
- Last analyzed
- October 5, 2026
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Overview
agent-harness is a Rust library for running coding agents from Rust programs through a common Harness interface. It normalizes agent output into events for text, reasoning, tool calls, plans, usage, and lifecycle, so application code can handle different backends with a consistent run loop.
It supports existing agent CLIs and ACP agents, as well as a built-in OpenAI-compatible implementation for chat APIs and local model servers. This suits developers building agent-enabled applications who want to switch providers or integrate tools without coupling their event handling to one agent's output format.
Key Features
- Provides a shared
Harnessinterface andRunEventstream across supported agents. - Supports Claude Code, OpenAI Codex, ACP agents, and OpenAI-compatible chat APIs.
- Includes a Rust tool loop for OpenAI-compatible models, including local model endpoints.
- Exposes host functions through
ToolServerandHostToolintegrations. - Offers both receiver-based
runand callback-basedstartexecution patterns. - Reports agent readiness and installation hints without installing agent software.
- Includes
cli-stream, a standalone subprocess engine for streaming output and cancellation.
Use Cases
- Rust application developers can add coding-agent runs while keeping response handling independent of a specific backend.
- Teams comparing or changing agent providers can reuse one event-processing loop and change the harness implementation.
- Developers using local or hosted OpenAI-compatible models can run tool-enabled agent workflows from Rust.
- Applications with in-process functions can expose those tools to supported agents without deploying a separate tool server.
Project Facts
- Language: Rust
- License: Apache-2.0
- Stars: 1
- Forks: 0
- Topics: none listed
- Archived: No
Getting Started
Add the crate with:
cargo add agent-harness
See the repository README and the crate documentation for provider setup, feature flags, and examples.
Alternatives
- harnessrouter: HarnessRouter unifies multiple agent harnesses behind a hosted-service API, while agent-harness is a Rust library with a typed event stream.
Considerations
- The project describes itself as being in active development, and its API may change.
- Agent CLIs and model providers must be available and configured separately; the crate reports readiness but does not install them.
- Provider support and examples may depend on enabling crate features such as
acporopenai-compatible. - The repository description and README differ in the agents they mention, so check the current crate documentation for the supported integrations.
Found this useful?
Share it with someone who would like agent-harness.
Source repository
Open the original repository on GitHub.
Related repositories
Similar repositories that may be relevant next.

zapfast: Use WhatsApp in a Native Desktop App
October 5, 2026
ZapFast is a Rust desktop client for WhatsApp on Linux, macOS, and Windows. It links to a phone as a companion device and avoids a browser engine, making it an option for people who want a lighter desktop messaging app.

skillrank: Find and Evaluate AI-Agent Skills
October 4, 2026
SkillRank is a Rust CLI for discovering, installing, and evaluating skills used by coding agents. Its paired local evaluations compare a skill-enabled run with a control to show changes in success, tokens, time, and cost.

prime-agent: Run Self-Improving Agents for Coding Work
October 2, 2026
Prime Agent is a coding and research agent built for long-running tasks, using a persistent Python environment, recursive subagents, and durable working context. It suits developers and researchers who need agents to keep working across sessions.

SwarmLLM: Run Local and Distributed AI Models
October 2, 2026
SwarmLLM runs open AI models on your computer and can pool resources with other computers to run larger models. It also provides OpenAI- and Anthropic-compatible APIs for local apps and agents.