Skip to main content

Crate harness

Crate harness 

Source
Expand description

Unified coding agent harness — run Claude Code, OpenCode, Codex, or Cursor through a single Rust API.

§Quick Start

use harness::{AgentKind, TaskConfig};

let config = TaskConfig::new("fix the bug", AgentKind::Claude);
let mut stream = harness::run_task(&config).await?;

Re-exports§

pub use config::AgentKind;
pub use config::OutputFormat;
pub use config::PermissionMode;
pub use config::TaskConfig;
pub use config::TaskConfigBuilder;
pub use error::Error;
pub use error::Result;
pub use event::Event;
pub use event::UsageData;
pub use models::ModelEntry;
pub use models::ModelRegistry;
pub use models::ModelResolution;
pub use normalize::NormalizeConfig;
pub use process::StreamHandle;
pub use runner::AgentCapabilities;
pub use runner::AgentRunner;
pub use runner::EventStream;

Modules§

agents
config
error
event
logger
models
normalize
process
registry
runner
settings

Structs§

CancellationToken
Re-export the cancel token type for convenience. A token which can be used to signal a cancellation request to one or more tasks.

Functions§

available_agents
List which agents are currently available on this system.
run_task
Create a runner for the given agent kind and execute the task, returning a stream of unified events.
run_task_with_cancel
Run a task with an optional cancellation token.