Sentinel — compliance-grade flight recorder + kill switch for AI agents
Project description
Sentinel
The compliance-grade flight recorder + kill switch for AI agents.
Sentinel sits between any AI agent (any framework) and its tools. Every action is checked against your policy before it runs, recorded into a tamper-evident audit trail you can replay and export as compliance evidence, and you can stop the agent instantly. The point is provability: knowing — and being able to prove — exactly what your agent did.
Status: MVP / alpha (v0.1). This is the narrow wedge of a larger vision (see RESEARCH.md and ROADMAP.md). It is not another prompt-injection filter — it leads with deterministic enforcement + provable audit.
⚠️ Disclaimer. Experimental; APIs may change; provided "as is", no warranty (Apache-2.0). Compliance mappings (EU AI Act Art. 12, OWASP) are indicative engineering aids — not legal advice or a certification. You remain responsible for your own compliance and for reviewing Sentinel before relying on it in high-stakes systems.
Why
Teams can't get sign-off to let agents touch high-stakes systems (trading, billing, prod DBs) because there's no audit-grade record of what the agent did, no enforcement of what it's allowed to do, and no instant stop. Regulation now forces the issue: EU AI Act Article 12 mandates automatic event logging for high-risk systems (enforcement from 2026-08-02). Sentinel is the layer that produces that evidence. Full market/competitive analysis: RESEARCH.md.
Core guarantees
- Default-deny — an action with no matching allow rule is blocked.
- Fail-closed — if the decision core itself errors, the action is blocked, not run.
- Tamper-evident — the audit log is hash-chained; any edit/reorder/delete is detectable via
verify.
Architecture (one glance)
agent ─tool_call─► Interceptor ─► KillSwitch? ─► Detector(flags) ─► Policy(default-deny)
│
audit (hash-chained, redacted) ◄── execute / block
Interception is an SDK wrapper today, behind an Interceptor interface so an
MCP-proxy adapter slots in later without touching the policy/audit/kill core.
Details + threat model: ARCHITECTURE.md.
Quickstart
python3 -m venv .venv && source .venv/bin/activate
pip install -e ".[dev]"
cp .env.example .env
# run the tests (security-critical core is tested first)
pytest
# run the end-to-end demo (a generic agent; see DEMO.md)
python examples/generic_agent.py # or: sentinel demo
# launch the control API + dashboard
sentinel serve # then open http://127.0.0.1:8787
Shortcut:
make install && make test && make demo. On PyPI the package isguardledger(thesentinelhandle is taken); the import name and CLI staysentinel—pip install guardledger→import sentinel.
Usage sketch
from sentinel import Sentinel
sentinel = Sentinel.from_files(policy="policies/starter.yaml", db="data/sentinel.db")
@sentinel.guard # every call is checked, logged, killable
def send_email(to: str, subject: str, body: str): ...
# …or guard a whole toolset at once:
tools = sentinel.wrap_all({"send_email": send_email, "search_web": search_web})
# over-policy / killed / suspicious calls raise BlockedError and are recorded;
# allowed calls run normally and are recorded with their outcome.
Works with any agent, any framework
Plain Python functions, LangChain, OpenAI Agents SDK, CrewAI, LlamaIndex, or MCP — guard
your tools with @sentinel.guard / sentinel.wrap_all(...), or use the MCP proxy/server.
See INTEGRATIONS.md. The default demo (sentinel demo) is a generic
agent; examples/trading_agent.py is a vertical example.
Two interceptors, one core
The SDK wrapper is the default. For agents that reach tools over MCP, the same
enforcement (Sentinel.enforce) runs behind a proxy — nothing the agent calls can
bypass it:
from sentinel import MCPProxy, SentinelMCPServer
proxy = MCPProxy(sentinel, upstream=my_mcp_session) # guard calls to upstream MCP servers
server = SentinelMCPServer(sentinel) # OR expose your own tools over MCP
server.add_tool("get_quote", get_quote) # with enforcement built in
Install the optional transports with pip install "guardledger[mcp,otel]".
Operating it
- Monitor mode —
SENTINEL_MODE=monitor(orSentinel(mode="monitor")) logs the would-be verdict and never blocks — the kill switch still works. Deploy in front of a live agent, watch, build trust, then flip to enforce. (TrySENTINEL_MODE=monitor sentinel demo.) - Dashboard auth — set
SENTINEL_API_TOKEN(or letsentinel servegenerate one); mutating endpoints (kill / policy / approve) then requireAuthorization: Bearer …. - Human-in-the-loop — a
require_approvalcall is parked; approve it from the dashboard orsentinel approve <id>, and the next identical call runs exactly once. - Interop —
sentinel export --format otelemits OpenTelemetry GenAI spans (gen_ai.*) for Langfuse / Datadog / any OTel backend. - Compliance —
sentinel compliance --allmaps Sentinel to EU AI Act, GDPR, NIST AI RMF, ISO 42001, Colorado AI Act, and SEC/FINRA with honest full/partial/none coverage (COMPLIANCE.md);sentinel export --format art12produces an EU AI Act Article 12 record-keeping report. - Housekeeping —
sentinel gcpurges stale approvals / rate-limit state (never the audit log). - Overhead — ~0.4 ms per guarded call on a dev laptop (policy + detector + two durable
audit writes), well under the 20 ms target. Reproduce:
python examples/benchmark.py.
Documents
| File | What |
|---|---|
| RESEARCH.md | Market & competitive research, wedge recommendation |
| PRD.md | Product requirements for this MVP |
| ARCHITECTURE.md | Components, data flow, threat model |
| DECISIONS.md | Decision log |
| INTEGRATIONS.md | Add Sentinel to any framework (LangChain, OpenAI, CrewAI, MCP, …) |
| LAUNCH.md | The honest go-to-market plan + ready-to-post launch assets (launch/, site/) |
| DEMO.md | How to run the end-to-end demo |
| ROADMAP.md | What's next, and the known-limitation → feature map |
| SECURITY.md | Design posture, self-check, known limitations |
| COMPLIANCE.md | Mapping to AI/data law (EU AI Act, GDPR, NIST, ISO 42001, Colorado, SEC/FINRA) |
| CHANGELOG.md | Release notes |
License
Apache-2.0.
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 guardledger-0.1.0.tar.gz.
File metadata
- Download URL: guardledger-0.1.0.tar.gz
- Upload date:
- Size: 87.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
21812bc45c6f4e6b164c4234ce28ca8e660d3ebfae63f540b0bfe071780774b5
|
|
| MD5 |
2985d358b115e6a78e82f726d90a4e44
|
|
| BLAKE2b-256 |
dff511fa8aaea23b10fbfd76ace668f7a199429e976b967b16b0fa47698ecd59
|
Provenance
The following attestation bundles were made for guardledger-0.1.0.tar.gz:
Publisher:
release.yml on itamarmeirovichai-source/sentinel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
guardledger-0.1.0.tar.gz -
Subject digest:
21812bc45c6f4e6b164c4234ce28ca8e660d3ebfae63f540b0bfe071780774b5 - Sigstore transparency entry: 1822254140
- Sigstore integration time:
-
Permalink:
itamarmeirovichai-source/sentinel@7ad6643f04835e0bb29d8b56352a93ac5d235eff -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/itamarmeirovichai-source
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7ad6643f04835e0bb29d8b56352a93ac5d235eff -
Trigger Event:
push
-
Statement type:
File details
Details for the file guardledger-0.1.0-py3-none-any.whl.
File metadata
- Download URL: guardledger-0.1.0-py3-none-any.whl
- Upload date:
- Size: 43.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccabdc58d0b648531208096b06010c6890a1a89bf688dc58927be4149996e833
|
|
| MD5 |
a03f540c653e4efe975863b39d59e254
|
|
| BLAKE2b-256 |
297a543faa140c9106dbe3dd0f397ea3947fd6f4c590f816e69cd94b07c6862b
|
Provenance
The following attestation bundles were made for guardledger-0.1.0-py3-none-any.whl:
Publisher:
release.yml on itamarmeirovichai-source/sentinel
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
guardledger-0.1.0-py3-none-any.whl -
Subject digest:
ccabdc58d0b648531208096b06010c6890a1a89bf688dc58927be4149996e833 - Sigstore transparency entry: 1822254173
- Sigstore integration time:
-
Permalink:
itamarmeirovichai-source/sentinel@7ad6643f04835e0bb29d8b56352a93ac5d235eff -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/itamarmeirovichai-source
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@7ad6643f04835e0bb29d8b56352a93ac5d235eff -
Trigger Event:
push
-
Statement type: