🛡️ Anchor Core (anchor-audit)
The Deterministic Runtime Governance & Compliance Kernel for Autonomous AI Systems.
Current release: 6.0.3 · Python 3.10–3.13
Anchor is a high-performance, dual-language (Rust/Python) infrastructure library designed to enforce strict regulatory invariants, architectural boundaries, and safety safeguards around autonomous AI agents and LLM application pipelines in real-time.
By executing compiled Abstract Syntax Tree (AST) query matchers and single-pass Deterministic Finite Automaton (DFA) regex sets, Anchor operates with zero-copy memory boundaries—designed to keep per-call overhead low. See benchmarks/bench_guard.py to measure it on your hardware.
🏎️ Core Architectural Horsepower
- Fast static scanning: Rust backend engine utilizing parallel directory walking via
rayonand memory-mapped files (memmap2). - Zero-Copy Memory Boundaries: Leverages PyO3 zero-copy buffer bridges to consume incoming network data frames straight from host ASGI server pools (like FastAPI) with zero heap allocation overhead.
- Asymmetric Cryptographic Identity: Every compiled audit log is bundled into an tamper-evident Decision Audit Chain (DAC) block, sealed locally using Ed25519 asymmetric keys and verified via constant-time hashing (
subtle::ConstantTimeEq). - Active Self-Healing Interception: Moves beyond passive post-mortem dashboards. If an active consumer agent drifts into an invariant violation, Anchor's runtime layer intercepts the thread, halts execution, and injects dynamic, domain-agnostic rerouting directives on the fly.
🏛️ Comprehensive Regulatory Scope
Anchor maps rules to the provisions they relate to (a pattern match is not a legal finding). Coverage includes:
- EU Artificial Intelligence Act (Regulation EU 2024/1689): Complete mapping from Chapter II Article 5 Prohibited Practices (subliminal manipulation, facial scraping safeguards) to Chapter III Articles 6–27 High-Risk System obligations (6-month log retention tracking under Art 12/19, Article 14 human override levers), stretching up to Article 99 turnover penalty metrics.
- U.S. Securities and Exchange Commission (SEC / FINRA): Hard automated boundaries protecting algorithmic trading setups under SEC Regulation SCI (System capacity loop circuit breakers), Exchange Act Rule 15c3-5 (Pre-trade credit and risk limit validation), and Cybersecurity Form 8-K outbound data exfiltration gates.
- Industry Frameworks: Built-in support for FINOS OSERA AI supply-chain resiliency blueprints, OWASP Top 10 LLM security controls, NIST AI RMF, and ISO/IEC 42001 standards.
📦 High-Velocity Installation
Deploy the compiled binary kernel straight into your production cluster workspace:
pip install anchor-audit
Anchor pulls in its runtime dependencies automatically (Click, HTTPX, PyYAML,
cryptography, wrapt, GitPython and the tree-sitter grammars), so the anchor
command is usable straight after install.
Optional extras:
pip install "anchor-audit[providers]" # OpenAI, Anthropic, Groq, Cohere, Ollama, ...
pip install "anchor-audit[server]" # FastAPI/ASGI gateway (anchor.app) + uvicorn
pip install "anchor-audit[dev]" # pytest, black, mypy
The CLI, the @guard decorator and the static scanner need none of these extras.
6.0.3 release highlights
- Telemetry remains explicitly opt-in and performs no network dispatch by default.
- Governance signatures are line-ending independent across Windows, macOS, and Linux.
- The package metadata, wheel smoke test, secret scanning, and developer extras are
aligned with the
pyproject.tomlbuild. - The committed governance public key is rotated; the private signing key is generated and retained outside the repository.
Initialize your local asymmetric cryptographic repository identity:
anchor init
Run a parallel static code safety audit across your local workspace:
anchor check .
🔌 Runtime Integration
Wrap a high-privilege agent routine or LLM invocation with a decorator. @guard only protects functions you wrap; unwrapped code is not covered.
from anchor import guard
@guard(domain="finance")
def execute_algorithmic_trade(order_payload):
# If the autonomous agent tries to route an un-vetted market order,
# Anchor audits the call payload before the function body runs and returns a BLOCKED_BY_ANCHOR directive on a match.
return route_order_to_exchange(order_payload)
from anchor.guard import guard is the equivalent spelling if you prefer to
import the decorator directly. Both are exercised by
tests/test_readme_example.py.
🌐 The AnimusLab Institution Network
Anchor Core acts as the local spoke auditing engine that feeds seamlessly into the wider, unified decentralized coordination hub ecosystem:
- Central Portal Hub: animuslab.dev
- Enterprise Fleet Cockpit: hub.animuslab.dev
- Statutory Rules Documentation: animuslab.dev/rules
- Authoritative Engineering Profile: tan.animuslab.dev
Maintained by AnimusLab.
⚠️ Limitations
@guard(Layer 2) covers only the functions you decorate. Keyword/pattern checks can be rephrased around; treat Anchor as one deterministic layer in defense-in-depth.- Telemetry is off by default. Set
ANCHOR_TELEMETRY=onto opt in; see docs/telemetry.md for exactly what is sent. - Static rules are pattern/AST based. Known detection gaps are tracked as
xfailtests intests/unit/test_detection_gaps.py.
Metadata
Release files for anchor-audit 6.0.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| anchor_audit-6.0.3.tar.gz | 224.6 kB | Without provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| anchor_audit-6.0.3-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details |
| anchor_audit-6.0.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details |
| anchor_audit-6.0.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ ARM64 | Details |
| anchor_audit-6.0.3-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details |
| anchor_audit-6.0.3-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details |
Total release size: 8.0 MB
Release files / anchor_audit-6.0.3.tar.gz
| Download URL | anchor_audit-6.0.3.tar.gz |
|---|---|
| Size | 224.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b104217c8eb0d7c20541a4d047abe158e7a2cec5d0fca0c832951aa024536846
|
|
BLAKE2b-256 checksum How to use checksums |
946ac2ea91f07b2f571e455f47060ca87949743105af13800cfe1ad64316d375
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / anchor_audit-6.0.3-cp310-abi3-win_amd64.whl
| Download URL | anchor_audit-6.0.3-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 1.4 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
d38f5297405625307a7709b4d1496927b6801f1ce936f0aa3357966e41ee3255
|
|
BLAKE2b-256 checksum How to use checksums |
d965685f0cd1934f00e8f781e9bef7fa20606322b9cf10354c7961520657eec9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.4
|
Release files / anchor_audit-6.0.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | anchor_audit-6.0.3-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
ad6f590cf7116c49e3216b2f3b50988e1d2c383ebb0d941800e3bc7362d754a4
|
|
BLAKE2b-256 checksum How to use checksums |
c47df398f792902bc7979dd3584cc43f08d42a9be017ddb46538fda1451a141f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / anchor_audit-6.0.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
| Download URL | anchor_audit-6.0.3-cp310-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl |
|---|---|
| Size | 1.7 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ ARM64 abi3 |
|
SHA-256 checksum How to use checksums |
8b8b6cacddf447506d6cb1729ee82f633651657b4bd746f8398fb936b4f2e060
|
|
BLAKE2b-256 checksum How to use checksums |
2ccf2d1ab52c5abb5fae3f477d1c61e975ab44ceea29ded9ccb7eb7c3ebb33a0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / anchor_audit-6.0.3-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | anchor_audit-6.0.3-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
08f4115d107dbd9e89a5340c1420efb5166b8b6cab7dbfd4a1d4b01e723828ab
|
|
BLAKE2b-256 checksum How to use checksums |
ee3e5a850628bb81e116ff87c821623f8300c40d78b61945c83c6d97cd706bc5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Release files / anchor_audit-6.0.3-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | anchor_audit-6.0.3-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
6e22af098a4dc569e85e6dbac905b7a1080b7b9227872456f32f1027f0950357
|
|
BLAKE2b-256 checksum How to use checksums |
2303defae939a953373dc2d281c57b52e81a9cf6b4d88d5f2ebfb1f039e0d23f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Security for anchor-audit 6.0.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.