AgentHarness

AgentHarness

Artificial Intelligence Cybersecurity Developer Tools Utilities

Deterministic guardrails for autonomous coding agents

AgentHarness is an open-source, deterministic gate between AI coding agents (Claude Code, Cursor, Cline, Copilot Workspace…) and your git repository. Every agent change is executed, diffed and audited before it ever reaches human review. What `harness run` does: • Sandbox: setup and validation commands run in Docker (or Wasmtime/WASI) with network egress denied by default; every egress attempt is audited. • Structural diff: Tree-sitter turns the change into language-neutral AST events (e.g. FunctionChanged:resolveUser). TypeScript/TSX, JavaScript/JSX and Python today. • Multi-agent conflicts: `harness conflicts` finds semantic conflicts between concurrent agent branches that a clean git merge hides, with Level 1 codemod fixes via --fix. • Security: secret scanning and a new-dependency policy; `harness scan` runs as the pre-commit hook. • Verdict: .harness/AgentManifest.json, a versioned machine-readable contract (verdict, blocking_reasons, impacted_files, steps, security_audit, conflicts) that agents and CI can parse and self-correct against. No LLM in the core: same diff, same verdict. Exit codes are scriptable: 0 pass, 1 blocked, 2 harness could not run. Get started: harness init --hooks → detects Node/Python/Rust/Go, writes harness.toml, installs pre-commit and pre-push hooks harness check → validates config, base ref and sandbox; every error comes with a fix harness run → the full gate Ships as a single Rust binary (Linux x86_64, macOS arm64/x86_64, Windows x86_64) with SHA-256 checksums and signed build provenance, plus a GitHub Action, a terminal UI (harness tui) and a token-protected local web UI (harness ui). Config is strict: unknown harness.toml keys are hard errors, so hallucinated config fails fast. Contributing: Rust workspace; ./scripts/check.sh mirrors CI exactly; Conventional Commits with DCO sign-off. Adding a language parser is under 100 lines of glue, the best first PR. Agent-authored PRs are welcome with a human author of record. Pre-alpha, v0.1.0. MIT OR Apache-2.0.