Skip to main content Switch to mobile version frontierharness 0.1.2 High-speed, zero-dependency core tool execution and safety engine for frontier AI agents.
pip install frontierharness Copy PIP instructions
frontierharness is an industry-grade, zero-dependency core tool execution, safety, and cognitive orchestration engine for autonomous AI agents. Built to power frontier agent harnesses like Antigravity and Claude Code, it provides the low-level nervous system and guardrails: path-isolated filesystem manipulation, surgical diffing, process supervision, context compaction, a specialized subagent triad (Explorer, Implementer, Verifier), and automated self-healing loops.
Architecture Overview
flowchart TD User["User Goal / Task"] --> Session["SessionManager
(JSONL Persistence & Token Compaction)"] Session --> Orchestrator["AdaptiveOrchestrator
(Role RBAC & Self-Healing Loop)"] subgraph Subagents ["Specialized Subagent Triad"] Explorer["1. Explorer Subagent
(Read-only search & index)"] Implementer["2. Implementer Subagent
(Surgical diffs & writes)"] Verifier["3. Verifier Subagent
(Syntax check & test gate)"] end Orchestrator --> Explorer Explorer --> Implementer Implementer --> Verifier subgraph Engine ["agentharness Core Engine"] FS["SafeFilesystem
(Path Traversal Guard)"] Proc["SubprocessManager
(Timeouts & Background Tasks)"] Loop["loopcircuit Hook
(Anti-Thrash Circuit Breaker)"] end Implementer --> FS Verifier --> Proc Proc --> Loop Verifier -->|Verification Failed| Orchestrator Verifier -->|Verification Passed| Done["Complete & Verified"] Key Capabilities
Path Traversal Protection: Enforces strict workspace root boundaries, preventing unauthorized path escapes and system tampering.
Surgical Diff Engine: Replaces exact character sequences rather than rewriting entire files, eliminating hallucinated line drifts.
Subagent Triad & Security RBAC: Specialized subagent roles with enforced tool permissions (Explorer read-only, Implementer modifying, Verifier test-only).
Self-Healing Verification Gate: Automatically validates code syntax and executes automated test suites on modified files, injecting recovery steps if tests fail.
Interactive Diff Viewer & Approval Gate: Displays color-coded terminal diffs (+6 -1) with line numbers and human confirmation prompts (Accept this file edit? [y/n/a]) before committing changes to disk.
Live Plan Checklist Renderer: Visualizes task progress in the terminal (L ✓, ●, ○) matching frontier standards.
Time-Travel Checkpoint & Rewind: Automatically snapshots pre-mutation file states, allowing instant undo or rollback of both physical files and agent memory back to any checkpoint.
Docker Container Sandboxing: Optional isolated container execution with network isolation (--network none) and memory/CPU limits.
Session Persistence & Smart Compaction: Incrementally records sessions to .harness/sessions/
Zero External Dependencies: Built 100% on Python 3.10+ standard library. Optional hooks for loopcircuit and groundanchor.
pip install frontierharness Optional safety integrations:
pip install "frontierharness[all]" Quickstart
1. High-Level Adaptive Orchestrator with Subagents
from frontierharness import ToolEngine, SessionManager, AdaptiveOrchestrator # Initialize core engine and session persistence engine = ToolEngine(workspace_roots=["./workspace"]) session = SessionManager(session_id="build_feature_01") orchestrator = AdaptiveOrchestrator(engine=engine, session=session) # 1. Define adaptive plan orchestrator.set_plan([ {"title": "Explore existing codebase", "role": "explorer"}, {"title": "Implement feature code", "role": "implementer"}, {"title": "Run automated verification", "role": "verifier"}, ]) # 2. Explorer reads files safely (Explorer cannot modify files) explore_res = orchestrator.execute_as_role( role="explorer", tool_name="read_file", args={"path": "./workspace/main.py"}, ) # 3. Implementer performs surgical exact edit edit_res = orchestrator.execute_as_role( role="implementer", tool_name="edit_file", args={ "path": "./workspace/main.py", "target": "return 100", "replacement": "return 200", }, ) # 4. Verifier gate checks syntax and runs test suite report = orchestrator.verify_and_heal(test_command="pytest ./workspace/tests") if not report.passed: print("Verification failed! Self-healing step injected:", orchestrator.plan[-1].title) else: print("Task verified and complete!") 2. Standalone Core Tool Engine
Run tools interactively in the terminal with human-in-the-loop approval:
python -m frontierharness run edit_file '{"path": "./main.py", "target": "port = 8080", "replacement": "port = 9000"}' --interactive Output:
Pending edit main.py +1 -1 41 - port = 8080 41 + port = 9000 Reason: Surgical string edit Accept this file edit? [y]es / [n]o / [a]lways allow: 4. Time-Travel Undo & Rewind
Instant rollback of file changes and newly created files to a clean checkpoint:
# Instant undo of the last step python -m frontierharness undo # Rewind to a specific checkpoint ID python -m frontierharness rewind cp_002_a1b2c3 5. Configurable Agent Skill System
Manage modular operational skills across your machine. Developers can configure custom machine paths where skills are discovered and saved:
from frontierharness import SkillManager, ToolEngine # 1. Initialize skill manager with a custom directory on your machine skills = SkillManager(custom_storage_path="D:/my-agent-skills") # Or reconfigure dynamically skills.set_skills_directory("C:/Users/dev/.gemini/config/skills") # 2. Automatically bind all skill scripts into ToolEngine as callable tools engine = ToolEngine(skill_manager=skills) # 3. Generate LLM system prompt addon listing active skills prompt_context = skills.get_system_prompt_addon() Or manage skills directly via the CLI:
# List all discovered skills across default or custom paths python -m frontierharness skills list --path "D:/my-skills" # Install a new skill folder into machine storage python -m frontierharness skills install ./new-skill --target "D:/my-skills" 6. Zero-Hallucination System Prompt Synthesis
Synthesize battle-tested, authoritative Markdown system prompts that instruct LLMs (Claude, GPT-4o, Gemini, local models) on exact tool schemas, surgical diffing laws, verification gates, and time-travel rollback:
# Output prompt to terminal python -m frontierharness prompt --role implementer # Save directly to a file python -m frontierharness prompt --role general --output ./SYSTEM_PROMPT.md Empirical Benchmarks
Measured on Windows 11 / Python 3.11 over 500 iterations:
Run benchmarks locally:
python -m frontierharness benchmark License
Licensed under the MIT License. Open-source runtime infrastructure for autonomous AI agents.
Released: Nov 30, 2026
Author/Maintainer: FrontierHarness Core Team
Both files in this release have provenance metadata.
View provenance details
governor grounding all dev
frontier-harness agent-harness tool-use tool-execution agent-runtime safe-filesystem surgical-diff context-protection subprocess-supervisor ai-agents antigravity claude-code docker-sandbox llm-safety
Development Status 5 - Production/Stable
Intended Audience Developers
License OSI Approved :: MIT License
Programming Language Python :: 3
Topic Scientific/Engineering :: Artificial Intelligence
Software Development :: Libraries :: Python Modules
System :: Systems Administration
Release files for frontierharness 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
Built distribution (wheel)
Total release size: 82.1 kB
Release files / frontierharness-0.1.2.tar.gz
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 30, 2026.
Release files / frontierharness-0.1.2-py3-none-any.whl
Security for frontierharness 0.1.2
Both files in this release have been uploaded with provenance metadata.
With provenance frontierharness-0.1.2.tar.gz Nov 30, 2026
Attestation for frontierharness-0.1.2.tar.gz
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.
Release history Release notifications | RSS feed
Nov 30, 2026 2 release files Full provenance
"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.
© 2026 Python Software Foundation
Deployed from fc0d8e6











