Halyn — The governance layer for AI agents. Every action intercepted. Every decision auditable.
Project description
Halyn
The governance layer for AI agents.
Every action intercepted. Every decision auditable. The AI cannot bypass it.
Website · Why Halyn · Install · Architecture · Protocols
Why Halyn
AI agents — Claude, GPT, Gemini, local models — act on your machine. They read files, send emails, control browsers, call APIs. With no independent proof of what happened.
Halyn is the independent layer that sits between any AI agent and your system.
Claude / GPT / Gemini / Ollama / Any agent
│
▼
┌─────────────────────────────┐
│ HALYN LAYER │ ← runs locally, out of agent reach
│ │
│ • Identity — who is acting? │
│ • Consent — was it approved? │
│ • Audit — SHA-256 chain proof │
│ • Shield — what can it NOT do? │
│ • Watchdog — integrity monitoring │
└─────────────────────────────┘
│
▼
Your machine · Your files · Your system
Every action produces a cryptographic proof stored locally. Not in the cloud. Not at Anthropic. On your machine.
Install
pip install halyn
halyn serve
Opens the dashboard at http://localhost:7420. Nothing leaves your machine.
# Or with curl
curl -fsSL https://halyn.dev/install | bash
The install script tells you exactly what it will do before doing anything.
Quick Start
from halyn import ControlPlane
# Start the governance layer
gov = ControlPlane()
gov.serve() # dashboard at localhost:7420
# Register an agent
agent = gov.register_agent(
name="claude-cowork",
provider="anthropic",
autonomy_level=2, # executor — reversible actions only
)
# Every agent action is intercepted and recorded
result = agent.act("read_file", "/docs/contract.pdf")
print(result.proof) # sha256:a3f2e1...
print(result.allowed) # True
Architecture
Halyn intercepts at three independent layers simultaneously:
Layer 1 — API Proxy
All LLM API calls (Claude, GPT, Gemini) pass through a local proxy on 127.0.0.1.
Intent is read before transmission. Shield rules apply before the request reaches the provider.
Implemented via iptables REDIRECT — kernel-level, not a library hook.
Layer 2 — Filesystem Hooks
inotify (Linux) / FSEvents (macOS) / ReadDirectoryChanges (Windows).
Every file access by an agent process is captured before execution, at the VFS layer.
LD_PRELOAD cannot bypass this — inotify fires in kernel space regardless.
Layer 3 — Process Isolation + eBPF
Halyn runs as a separate system user. Agents cannot read or write its audit database.
On Linux ≥5.8: eBPF programs are pinned to /sys/fs/bpf/halyn/ and monitor all syscalls.
Audit chain is SHA-256 with chained hashes, AES-256 encrypted at rest.
Layer 4 — Browser Guard (optional)
Chrome Enterprise Policy extension intercepts all CDP calls, DOM mutations, XHR, and fetch.
Deployed via /etc/opt/chrome/policies/managed/halyn.json — the agent cannot uninstall it.
Autonomy Levels
| Level | Name | What the agent can do |
|---|---|---|
| 0 | Observer | Read-only access. No mutations. |
| 1 | Assistant | Suggests actions. Human executes. |
| 2 | Executor | Executes reversible actions. |
| 3 | Delegated | Executes with post-hoc audit. |
| 4 | Autonomous | Full autonomy. Use with extreme caution. |
Supported Agents
| Agent | Type | Integration |
|---|---|---|
| Claude (Anthropic) | Cloud | Proxy + MCP |
| GPT-4o / o3 (OpenAI) | Cloud | Proxy |
| Gemini (Google) | Cloud | Proxy |
| Ollama | Local | Direct |
| LM Studio | Local | Direct |
| Jan.ai | Local | Direct |
| OpenClaw | Agentic | Interceptor |
| Any MCP agent | Any | MCP server |
Protocols
Halyn implements two open protocols:
AAP — Agent Accountability Protocol
The accountability layer MCP and A2A don't have.
Four primitives: Identity, Provenance, Authorization, Audit.
Spec: github.com/halyndev/aap · License: MIT
NRP — Node Reach Protocol
Safety standard for agents in physical and connected systems.
Six rules: Manifest, Observe, Act, Shield, Audit, Consent.
Spec: github.com/halyndev/nrprotocol · License: MIT
Dashboard
The local dashboard at http://localhost:7420 provides:
- Live feed — every agent action in real time, in plain language
- Agents — who is active, at what autonomy level, how to pause or stop
- Audit chain — cryptographic proof of every action since install
- Rules — configure what each agent can and cannot do
- Protocols — connected devices and integrations
- Insights — patterns, blocked actions, anomalies
The dashboard process runs under a separate system user. Agents cannot kill, read, or modify it.
Security Honest Statement
Halyn does not claim bypassing is impossible.
Halyn claims: every bypass attempt leaves a proven trace you see first.
Known limitations are documented in SECURITY.md.
Report vulnerabilities to contact@halyn.dev — we respond within 24 hours.
Contributing
See CONTRIBUTING.md.
License
BSL-1.1 — Business Source License 1.1
- Free for personal use, research, and education
- Commercial use requires a license — contact@halyn.dev
- Change date: 2029-03-25 → becomes MIT automatically
Protocol specs (AAP, NRP) are MIT and always will be.
Author: Elmadani SALKA · contact@halyn.dev · halyn.dev
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file halyn-2.1.0.tar.gz.
File metadata
- Download URL: halyn-2.1.0.tar.gz
- Upload date:
- Size: 82.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
238acc57d810c7b4752f6d7ed754cec4de7a33bbc579f8cf15954e89456bd4b1
|
|
| MD5 |
7614fecedbb5a291997546e42fbbf075
|
|
| BLAKE2b-256 |
5a4b4a3bc9076e0ed46136387fd216c020ee75a4e859c3953079a5547dd1e910
|
File details
Details for the file halyn-2.1.0-py3-none-any.whl.
File metadata
- Download URL: halyn-2.1.0-py3-none-any.whl
- Upload date:
- Size: 103.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cdb190e3b3a52a9eb94c744d1051d815bee0d214de05a2ae1c793e1bc2551022
|
|
| MD5 |
16a6161afc67cde0ea20e116d8ed47bc
|
|
| BLAKE2b-256 |
14a5ae905fe72a6d0482e800817ff8f136e0f946fca7a8484d2fe7a9caeef2ac
|