Skip to main content

A Zero-Trust security middleware and intent validation engine for AI Agents.

Project description

🛑 Halt Core

The Zero-Trust Operating System Layer for Autonomous AI Agents.

Current AI agents are fundamentally flawed. Giving a Large Language Model direct execution access to your terminal or database is like putting a 5-year-old in the driver's seat of a Formula 1 car. They hallucinate, they get tricked by prompt injections, and they make catastrophic mistakes.

Halt Core is the safety belt, the airbag, and the emergency brake. It is a sub-millisecond middleware SDK that intercepts, evaluates, and blocks destructive AI agent commands before they touch your system.


⚡ Features

  • Sub-Millisecond Execution: Stateless rules (deny-lists) execute in ~0.05ms. Your agents won't even feel the latency.
  • Stateful Memory Tracking: AI attacks are often multi-step (e.g., download payload -> make executable -> run). Halt Core remembers the agent's session history and blocks dangerous execution chains.
  • Semantic Intent Engine (Powered by Microsoft Phi-4): Bad actors obfuscate commands. Halt Core routes suspicious commands through a local, air-gapped Small Language Model (SLM) to read the true intent behind the code.
  • Zero-Trust "Fail-Secure" Architecture: If the local LLM daemon goes offline, Halt Core defaults to blocking the action. Security over convenience, always.
  • Developer-First SDK: Integrate into any LangChain, CrewAI, or custom Python agent pipeline with exactly two lines of code.

🛠️ Installation

Halt Core runs locally to ensure maximum data privacy. Your agent's logs never leave your servers.

1. Prerequisites

You need Ollama installed to run the local semantic engine. Once installed, pull the Phi-4-mini model:

ollama run phi4-mini

2. Install Halt Core

Install the SDK directly via pip:

pip install halt-core

🚀 Quick Start

Integrating Halt Core into your existing AI worker is effortless. Pass the agent's intended action to the evaluate function before executing it on your host machine.

from halt_core import evaluate

# 1. Your AI agent generates a command (e.g., a destructive SQL query)
agent_command = "DROP TABLE production_users;"

# 2. Intercept with Halt Core
decision = evaluate(
    action_type="sql", 
    command=agent_command, 
    agent_id="agent_dba_01"
)

# 3. Act on the decision
if decision["safe"]:
    print("Action Approved. Executing...")
    # Execute the command on your system
else:
    print(f"🛑 ACTION BLOCKED: {decision['reason']}")
    print(f"💡 Remediation sent back to AI: {decision['remediation']}")

Expected Output:

{
  "safe": false,
  "reason": "Action rejected because SQL command contains blocked destructive keyword(s): DROP.",
  "remediation": "Do not execute destructive operations. Use 'SELECT' or consult the administrator. Please try again safely.",
  "latency_ms": 0.106
}

🧠 How the Architecture Works

  1. Fast Lane (Rules & State): The command is first checked against modular static rules and the in-memory state tracker.
  2. Deep Inspection (Phi-4): If the command bypasses static rules but looks structurally complex, it is forwarded to the local phi4-mini model.
  3. Feedback Loop: Halt Core doesn't just block; it provides structured remediation strings. You can feed this string back into your LLM prompt so your agent can learn from its mistake and self-correct.

🔒 License

MIT License. Built for the future of safe Artificial General Intelligence.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

halt_core-0.3.0.tar.gz (21.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

halt_core-0.3.0-py3-none-any.whl (23.8 kB view details)

Uploaded Python 3

File details

Details for the file halt_core-0.3.0.tar.gz.

File metadata

  • Download URL: halt_core-0.3.0.tar.gz
  • Upload date:
  • Size: 21.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for halt_core-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d6288727f06db6d1eb233498a5dc1cf152b116971a900b760dc3d679fe86ed71
MD5 ec9db5d4cd86544babcbbf7239bd0440
BLAKE2b-256 df4848fa9f5bf22456c400aad9086fcc08708a41fea50d043c8dbe18fbd3b14b

See more details on using hashes here.

File details

Details for the file halt_core-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: halt_core-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 23.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for halt_core-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa964c73b38bce71f472dc212bc571d11c3bbfaeb9e2c307c028c01dae0da78b
MD5 b97dcc2b17105056e5e9716742d97350
BLAKE2b-256 3714e71ebd177af3cc5c7c768369e90e2be73a8e79b7fa1a1dcf7a7ce6463084

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page