agent-harness: Use Coding Agents from Rust Applications

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
View on GitHub

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 Harness interface and RunEvent stream 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 ToolServer and HostTool integrations.
  • Offers both receiver-based run and callback-based start execution 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 acp or openai-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.

View on GitHub

Related repositories

Similar repositories that may be relevant next.

OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️