A deterministic harness layer ensuring enterprise agents operate safely with sandboxed tools, partitioned memory, capability permissions, and automated circuit breakers.
- Sandboxed Tool Execution: Isolates all agent tool invocations with strict execution ceilings (3.0s limit) and capability token validation via
ToolManager. - Partitioned Context Memory & Poison Defense: Separates ephemeral scratchpads from long-term memory while scrubbing corruption patterns via
MemoryAgent. - Runaway Loop Circuit Breakers: Detects runaway token consumption and infinite loops in real time, automatically tripping circuit breakers via
ObserverAgent. - Deterministic State Rollbacks: Reverts partial memory mutations and state changes when tool calls fail or exceed safety budgets.
- Interactive Sandbox Studio: Glassmorphic bilingual (English/Arabic RTL) dashboard with live tool sandboxes, memory inspectors, and telemetry gauges.
┌─────────────────────────┐
│ 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 │
└──────────────────┘ └──────────────────┘ └──────────────────┘
# 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- Interactive Sandbox Studio: http://127.0.0.1:8008/
- Swagger OpenAPI Docs: http://127.0.0.1:8008/docs
- Autonomy —
ObserverAgentdetects 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.
- 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.
Built by Asadullah Shafique.
🔗 Explore my portfolio showcasing Agentic AI projects and real-world applications: asadullahshafique-devunity.vercel.app
- DevUnity Portfolio: https://asadullahshafique-devunity.vercel.app
- SecureBridge: https://github.com/asadullah48/securebridge
- WorkforceAI Academy: https://github.com/asadullah48/workforceai-academy
- ConciergeAgent: https://github.com/asadullah48/conciergeagent
- ContextX: https://github.com/asadullah48/contextx
- GuardrailAI: https://github.com/asadullah48/guardrailai
- MarketAgentHub: https://github.com/asadullah48/marketagenthub
- WorkforceAI: https://github.com/asadullah48/workforceai
- DomainX: https://github.com/asadullah48/domainx