Skip to main content

Halyn — NRP control plane with domain-scoped authorization.

Project description

Halyn

Connect any device to any AI.

PyPI License Python

MCP Server · 12 drivers · Shield rules · Audit chain · 5 autonomy levels

Website · Quickstart · MCP Server · Tutorials


The Problem

MCP connects AI to software. But AI is entering the physical world — robots, drones, factories, farms, hospitals. There's no universal standard for how AI safely controls hardware.

Halyn connects AI to everything else. Servers, sensors, robots, industrial machines, smart homes — with safety rules the AI cannot break.

Quickstart

pip install halyn
from halyn import ControlPlane, SSHDriver

cp = ControlPlane()
cp.connect(SSHDriver("192.168.1.10", "admin"))

# Safety rules — the AI physically cannot bypass these
cp.shield("deny * delete *")
cp.shield("deny * write /etc/*")

# Observe
state = cp.observe()
print(state)  # {"cpu": 23.4, "mem": 67.2, ...}

# Act (within shield rules)
cp.act("restart nginx")     # ✓ allowed
cp.act("rm -rf /etc")       # ✗ blocked by shield

MCP Server

Connect Claude.ai, ChatGPT, Cursor, or any MCP client directly to your devices:

# Start the MCP Server
halyn-mcp --port 8935

# In Claude.ai → Settings → MCP → Add Server
# URL: http://your-server:8935/mcp

Then just talk:

  • "Show me the status of all connected devices"
  • "What's the temperature in the greenhouse?"
  • "Restart nginx on server-01"
  • "Show me the audit trail"

The AI sees your devices as tools. Shield rules still apply. Every action is audited.

12 Drivers

Driver Target Protocol
SSHDriver Linux/Mac servers SSH
HTTPDriver REST APIs, webhooks HTTP
WebSocketDriver Real-time streams WebSocket
SerialDriver Arduino, Pi, PLCs Serial
MQTTDriver IoT sensors MQTT
OPCUADriver Industrial machines OPC-UA
ROS2Driver Robots, drones ROS2/DDS
DDSDriver Real-time systems DDS
DockerDriver Containers Docker API
BrowserDriver Web automation Chrome CDP
UnitreeDriver Unitree robots UDP
SocketDriver Raw TCP/UDP Socket

Safety

Shield Rules — Constraints enforced at protocol level. The AI has no power to override them.

cp.shield("deny * delete *")                    # no deletions
cp.shield("deny * write temperature > 180")     # thermal limit
cp.shield("deny lock unlock between 23:00-06:00")  # doors locked at night

Audit Chain — Every action recorded in SHA-256 hash chain. Tamper-evident. Append-only.

Consent Protocol — Devices and AI negotiate permissions before any interaction.

5 Autonomy Levels — From fully manual to fully autonomous. You choose.

Level Name Who Decides
0 Manual Human does everything
1 Advisory AI suggests, human acts
2 Supervised AI acts, human approves
3 Monitored AI acts freely, human watches
4 Autonomous AI decides within shield rules

Works with Every LLM

# Claude
import anthropic
client = anthropic.Anthropic()
response = client.messages.create(model="claude-sonnet-4-6", ...)
cp.act(response.content[0].text)

# GPT
from openai import OpenAI
client = OpenAI()
response = client.chat.completions.create(model="gpt-5", ...)

# Local (Ollama — no internet needed)
import ollama
response = ollama.chat(model="llama4", ...)

# All use the same shield rules. Same audit chain.

Built on NRP

Halyn implements NRP (Node Reach Protocol) — the open standard for AI-to-device communication. 6 primitives: Manifest, Observe, Act, Shield, Audit, Consent.

Free. Open Source. Forever.

MIT licensed. Use it for anything. Modify it. Build a company on it. No fees, no limits, no lock-in.


halyn.dev · nrprotocol.dev · PyPI · contact@halyn.dev

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

halyn-0.4.2.tar.gz (76.9 kB view details)

Uploaded Source

Built Distribution

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

halyn-0.4.2-py3-none-any.whl (87.1 kB view details)

Uploaded Python 3

File details

Details for the file halyn-0.4.2.tar.gz.

File metadata

  • Download URL: halyn-0.4.2.tar.gz
  • Upload date:
  • Size: 76.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for halyn-0.4.2.tar.gz
Algorithm Hash digest
SHA256 d73d761442c78a3f2d83d855f73f46a15d566f7e5105a1b9118ba3b30b331159
MD5 6559e7e15416b2e9e2bfa8374dc3697d
BLAKE2b-256 51f4d0aebd09618ed0770367b63c1638fea382dfbf0ed81a6397378327f92dce

See more details on using hashes here.

File details

Details for the file halyn-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: halyn-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 87.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for halyn-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6ce72c99c1b3cb9eda77b1f123e8f1c0cc6199ad62c17df59358156e9ce4a497
MD5 b270cfba770ea78c5b0644a90bc0472d
BLAKE2b-256 90e3ab741fa41c0abc2b74fdc29c5ec2de6e250d22df7576dec4055d66dc3916

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