Skip to content
asadullah48Public

About

A deterministic harness architecture that guarantees enterprise agents operate with uncompromising safety leveraging sandboxed tools, partitioned memory, granular capability permissions, and automated circuit breakers to enforce reliability at scale.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

🛡️ HarnessAI: Safe Operating Environment for Autonomous Agents

A deterministic harness layer ensuring enterprise agents operate safely with sandboxed tools, partitioned memory, capability permissions, and automated circuit breakers.

License: Apache 2.0 Python 3.10+ Tests Passing FastAPI Author


🚀 Key Value Propositions

  1. Sandboxed Tool Execution: Isolates all agent tool invocations with strict execution ceilings (3.0s limit) and capability token validation via ToolManager.
  2. Partitioned Context Memory & Poison Defense: Separates ephemeral scratchpads from long-term memory while scrubbing corruption patterns via MemoryAgent.
  3. Runaway Loop Circuit Breakers: Detects runaway token consumption and infinite loops in real time, automatically tripping circuit breakers via ObserverAgent.
  4. Deterministic State Rollbacks: Reverts partial memory mutations and state changes when tool calls fail or exceed safety budgets.
  5. Interactive Sandbox Studio: Glassmorphic bilingual (English/Arabic RTL) dashboard with live tool sandboxes, memory inspectors, and telemetry gauges.

🏛️ HarnessAI Architecture

                    ┌─────────────────────────┐
                    │    Agent Task Loop      │
                    └────────────┬────────────┘
                                 │
                    ┌────────────▼────────────┐
                    │  HarnessAI Safe Runtime │
                    │ • Blast Radius Control  │
                    │ • Budget Clamping       │
                    └────────────┬────────────┘
                                 │
         ┌───────────────────────┼───────────────────────┐
         ▼                       ▼                       ▼
┌──────────────────┐   ┌──────────────────┐   ┌──────────────────┐
│   ToolManager    │   │   MemoryAgent    │   │  ObserverAgent   │
│ • Sandboxing     │   │ • Partitioned Mem│   │ • Loop Telemetry │
│ • Timeouts       │   │ • Poison Scrub   │   │ • Token Tracking │
│ • State Rollback │   │ • TTL Eviction   │   │ • Circuit Trip   │
└──────────────────┘   └──────────────────┘   └──────────────────┘

🛠️ Quick Start

# 1. Clone repository
git clone https://github.com/asadullah48/harnessai.git
cd harnessai

# 2. Install dependencies
pip install -e .

# 3. Run automated test suite
python -m pytest tests -v

# 4. Start local gateway & frontend sandbox studio
uvicorn harnessai.server:app --host 127.0.0.1 --port 8008 --reload

🤖 Agentic AI Alignment

  • Autonomy — ObserverAgent detects runaway loops and trips a circuit breaker on its own; no human is watching token consumption in real time to catch a misbehaving agent.
  • Resilience — deterministic state rollbacks revert partial memory mutations when a tool call fails or exceeds its safety budget, so a failed action can't leave the agent's memory in a half-written state.
  • Adaptivity — ToolManager's capability-token validation and execution ceilings are configuration per tool, so a new tool is onboarded with a permission grant, not a change to the sandbox itself.

Roadmap

  • Expose the sandbox as an MCP-compatible tool gateway, so other agent systems in this portfolio can run untrusted tools through HarnessAI instead of executing them directly.
  • Extend the circuit-breaker telemetry to a shared observability backend across the agent projects that would use this harness.

🤖 Author

Built by Asadullah Shafique.

🔗 Explore my portfolio showcasing Agentic AI projects and real-world applications: asadullahshafique-devunity.vercel.app

🌐 Connected Ecosystem & Portfolio

About

A deterministic harness architecture that guarantees enterprise agents operate with uncompromising safety leveraging sandboxed tools, partitioned memory, granular capability permissions, and automated circuit breakers to enforce reliability at scale.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages