Skip to main content

Governance and security layer for auditable AI agent systems.

Project description

Hlinor Agent Registry

Latest: The OpenAI/Hugging Face Sandbox Escape: Why Declarative AI Governance is No Longer Optional - Dev.to article

PyPI version Python 3.10–3.13 License: Apache-2.0 Tests GitHub stars

Open-source registry layer for auditable AI agent systems. Define what your AI agents may do, validate it before execution, and keep the decision auditable — without replacing the framework that runs your agents.

Hlinor Agent Registry is a declarative governance layer for agent systems. It turns action boundaries, policies, approvals, and runtime evidence into reviewable YAML contracts that developers and security teams can understand.


⚡ Quickstart (Zero Friction)

Get up and running in 3 simple steps:

1. Install

pip install hlinor-registry

2. Initialize Templates

Generate a ready-to-use registry manifest and agent policy file with safe defaults:

hlinor-registry init

(This creates registry.yaml and my_agent.yaml in your current directory)

3. Compile and Test

Compile your policies into an integrity-checked JSON bundle:

hlinor-registry compile --manifest registry.yaml --output bundle.json

New manifests should declare schema_version, metadata.environment, metadata.bundle_revision, and metadata.policy_revision. The legacy top-level version field remains accepted for 0.4.x migration compatibility.

Test the governance enforcement directly from the CLI:

# Test an allowed action
hlinor-registry check --bundle bundle.json --agent my-agent --action read_database

# Test a blocked action (Fail-closed in action)
hlinor-registry check --bundle bundle.json --agent my-agent --action send_external_email

For an auditable machine-readable decision, emit JSONL and optionally append the same provenance-aware event to a durable log file:

hlinor-registry check \
  --bundle bundle.json \
  --agent my-agent \
  --action read_database \
  --format jsonl \
  --audit-log logs/governance-decisions.jsonl

Each event includes the decision ID, timestamp, reason code, and SHA-256 digest of the policy bundle used to make the decision. It also binds the decision to a canonical request digest.

For context-rich evaluation, use the immutable request API:

from hlinor_registry import ActionRequest, PolicyChecker

request = ActionRequest(
    agent_id="financial-audit-agent",
    action="read",
    actor_id="service:finance-prod",
    resource="report:quarterly",
    attributes={"classification": "confidential"},
    environment="production",
)
decision = PolicyChecker("bundle.json").evaluate(request)

🛡️ Use cases

Prevent PII leaks

Keep agents that process sensitive data away from external communication and make the restriction explicit in a reviewed registry file:

id: financial-audit-agent
name: Financial Audit Agent
department: finance
description: Audits internal financial reports.
skills: [read_database, anomaly_detection, generate_report]
validators: [financial-data-validator]
policies: [no-pii-in-logs, read-only-database-access]
allowed_actions: [read, analyze, summarize, generate_pdf_report]
blocked_actions: [send_external_email, delete_records]

The blocklist takes priority over the allowlist:

from hlinor_registry import PolicyChecker

checker = PolicyChecker("bundle.json")
decision = checker.check_action("financial-audit-agent", "send_external_email")

assert decision.denied
# decision.reason_code: ACTION_BLOCKLISTED
# decision.matched_policy_ids: ("no_pii_in_logs",)

Block unauthorized actions

Use a strict allowlist for agents that should only perform a narrow set of operations. Everything outside the list is denied by PolicyChecker:

decision = checker.check_action("research-agent", "delete_records")

if decision.denied:
    print(f"Blocked before execution: {decision.reason_code}")

This gives security reviews a concrete answer to the question: “What can this agent do?”

Enforce API budgets and rate limits

Declare budget and rate-limit policies next to the agent's permitted actions. Adapters or preflight checks can evaluate these policies before a costly call:

id: web-research-agent
name: Web Research Agent
department: marketing
description: Collects competitor information from public sources.
skills: [web_search, scrape_public_website, summarize_text]
validators: [public-source-validator]
policies:
  - max_10_searches_per_hour
  - require_budget_check
  - block_known_malicious_domains
allowed_actions: [search, read_public_url, extract_keywords]
blocked_actions: [login_to_website, submit_forms, call_premium_paid_api]
metadata:
  api_budget_limit_usd: 5.00

The registry makes the constraint visible, versionable, and reviewable instead of burying it inside one agent implementation.


🏗️ Architecture

flowchart LR
    A["Developer or security team"] --> B["Explicit registry.yaml manifest"]
    B --> C["hlinor-registry compile"]
    C --> D["Integrity-checked JSON policy bundle"]
    D --> E["Runtime adapter or PolicyChecker"]
    E --> F{"Action permitted?"}
    F -->|Yes| G["Execute tool or skill"]
    F -->|No| H["Block and record decision"]
    E --> I["Execution receipts and audit evidence"]
    I --> J["Review, compliance, and incident response"]

Hlinor sits beside your execution framework. Your agents can continue to run in LangChain, CrewAI, or a custom stack while their action boundaries are compiled from an explicit, inspectable manifest.

Long-lived LangChain tools and @governed functions detect a changed bundle and reload it before the next decision. Deploy new bundles atomically so a running process always observes a complete, digest-verified file.

The compiler writes through a verified temporary file and atomically replaces the destination. Agent and capability namespaces are separate, unknown explicit entity types are rejected, and production manifests reject permissive agents unless the unsafe CLI override is deliberately supplied. A missing type remains compatible with legacy agent files; new files should declare type: agent or type: capability explicitly.


🆚 Hlinor vs. alternatives

Capability LangChain CrewAI Build it yourself Hlinor Registry
Primary role Agent and tool orchestration Multi-agent orchestration Whatever you implement Governance and policy layer
Policy source Application and tool code Agent/task configuration Custom conventions Declarative YAML contracts
Action decisions Add your own guardrails Add your own guardrails Fully custom Reusable PolicyChecker and validators
Runtime boundaries Framework-dependent Framework-dependent Custom Allowlist/blocklist patterns and schemas
Audit model Build around your stack Build around your stack Fully custom Audit-ready receipts and evidence schemas
Works with other frameworks Not the goal Not the goal Depends on design Designed to sit beside them

Hlinor is not an execution framework. Use it when governance must be explicit, reviewable, and portable across the systems that execute your agents.


👥 Who is this for?

  • Platform teams building internal agent infrastructure.
  • Security and compliance teams reviewing agent capabilities.
  • Developers who need a policy boundary before tools cause side effects.
  • Teams operating multiple agents across departments or projects.
  • Open-source maintainers who want YAML examples and automated validation in CI.

📦 Installation

From PyPI

pip install hlinor-registry

The core package requires Python 3.10 or newer and PyYAML. It does not install LangChain or another agent framework.

Optional integrations

Hlinor is framework-agnostic. We provide ready-to-use wrappers for popular agent ecosystems:

LangChain

pip install "hlinor-registry[langchain]"
from hlinor_registry.integrations.langchain import GovernedTool

safe_tool = GovernedTool(
    tool=my_langchain_tool,
    agent_id="research-agent",
    bundle_path="./dist/policy-bundle.json",
)

CrewAI

pip install "hlinor-registry[crewai]"
from hlinor_registry.integrations.crewai import GovernedCrewTool

safe_search_tool = GovernedCrewTool(
    executor=my_crewai_tool.func,
    name="web_search",
    description="Search the web",
    agent_id="research-agent",
    action_name="search_web",
    bundle_path="./dist/policy-bundle.json",
)

See examples/ for complete, runnable integration examples.

Development dependencies

pip install -e ".[dev]"
pytest

💻 CLI Reference

Zero-friction commands:

hlinor-registry --version                          # Show version
hlinor-registry init                               # Generate template registry.yaml and my_agent.yaml
hlinor-registry check --bundle X --agent Y --action Z  # Test an action against a compiled bundle
hlinor-registry explain --bundle X --agent Y --action Z  # Get detailed audit explanation
hlinor-registry check --bundle X --agent Y --action Z --format jsonl --audit-log decisions.jsonl

Core commands:

# Compile an explicit manifest into the integrity-checked runtime bundle
hlinor-registry compile --manifest registry.yaml --output dist/policy-bundle.json

# Explicit unsafe override for controlled migration only
hlinor-registry compile --manifest registry.yaml --output dist/policy-bundle.json \
  --allow-permissive-production

# Validate a registry file
hlinor-registry validate-agent examples/search-agent.yaml

# Validate runtime governance contracts
hlinor-registry validate-execution-context <path>
hlinor-registry validate-action-preflight <path>
hlinor-registry validate-capability <path>
hlinor-registry validate-capability-registration examples/funding_intelligence.yaml
hlinor-registry validate-protected-resource-boundary <path>
hlinor-registry validate-evidence-claim <path>
hlinor-registry validate-circuit-breaker <path>

# Inspect a YAML file without changing it
hlinor-registry inspect <path>

📚 Documentation

Models and architecture

Governance patterns


🛡️ Trust signals

  • Comprehensive automated tests covering compilation, validation, policy enforcement, and CLI commands.
  • GitHub Actions runs the test suite on Python 3.10, 3.11, 3.12, and 3.13.
  • Pre-commit hooks (ruff, mypy, yamllint) ensure consistent code quality.
  • YAML schemas, examples, and governance decisions are designed to be reviewed in pull requests.
  • Licensed under Apache-2.0 for broad open-source and commercial use.

🤝 Community and support


🏢 Enterprise

Teams adopting agent governance at scale can contact the HlinorAI team at team@hlinor.ai for architecture guidance, policy design, and integration support.


📜 License

Hlinor Agent Registry is available under the Apache License 2.0.

🚀 Contributing

Contributions are welcome. Start with an issue or pull request that explains the governance problem, the proposed registry contract, and how the behavior is tested.


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

hlinor_registry-0.4.2.tar.gz (46.0 kB view details)

Uploaded Source

Built Distribution

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

hlinor_registry-0.4.2-py3-none-any.whl (34.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: hlinor_registry-0.4.2.tar.gz
  • Upload date:
  • Size: 46.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for hlinor_registry-0.4.2.tar.gz
Algorithm Hash digest
SHA256 78a8104fb1ff4ebaa9482c7d244fe2faab28b2631b9c62d0c516ab369b5aba3d
MD5 0104fc6a8774278a29c208e5c70a1ec1
BLAKE2b-256 85d75b58328b83d60a0ddd173c7f9488ff77563cdbae22b5106147a623e4ea50

See more details on using hashes here.

Provenance

The following attestation bundles were made for hlinor_registry-0.4.2.tar.gz:

Publisher: release.yml on HlinorAI/hlinor-agent-registry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: hlinor_registry-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 34.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for hlinor_registry-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ad58bf7c5dbfe7d992809d764fbfb4b5b35a57f4b5f6c0a47e87b64732303ef7
MD5 16e1c75f521472d2a5717c68c7bb74b3
BLAKE2b-256 b6b47f2b6b2a806437aab3060479245434722b82518beaeb0ff05eb3c66ea00a

See more details on using hashes here.

Provenance

The following attestation bundles were made for hlinor_registry-0.4.2-py3-none-any.whl:

Publisher: release.yml on HlinorAI/hlinor-agent-registry

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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