# agent-harness: Use Coding Agents from Rust Applications

This repository profile is provided by osrepos.com, an open source repository discovery platform.

Source: osrepos.com
Repository profile: https://osrepos.com/repo/getlatentic-agent-harness
Generated for open source discovery and AI-assisted research.

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.

GitHub: https://github.com/getlatentic/agent-harness
OSRepos URL: https://osrepos.com/repo/getlatentic-agent-harness

## 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.

## Topics

- rust
- ai-agents
- library
- coding-agent
- agent-framework
- cli-agent-adapters
- normalized-event-stream

## Repository Information

Last analyzed by OSRepos: Mon Oct 05 2026 21:55:23 GMT+0100 (Western European Summer Time)
Detail views: 1
GitHub clicks: 0

## Safety Notice

OSRepos shares public repositories for knowledge and discovery only. Review source code, dependencies, licenses, and security implications before running or installing anything.

## Content

## 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:

```sh
cargo add agent-harness
```

See the [repository README](https://github.com/getlatentic/agent-harness) and the crate documentation for provider setup, feature flags, and examples.

## Alternatives

- [harnessrouter](https://osrepos.com/repo/harnessrouter-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.