Metadata-Version: 2.3
Name: argus-sentry
Version: 1.0.1
Summary: The Argus boundary for AI agents: capability token enforcement for every tool call, skill, MCP action, and agent-to-agent request of any model.
Project-URL: Homepage, https://github.com/Esthien-Labs/argus-sentry
Project-URL: Documentation, https://github.com/Esthien-Labs/argus-sentry/tree/main/docs
Author: Esthien
License: Apache-2.0
Keywords: ai-agents,capability-tokens,enforcement,evidence,mcp
Requires-Python: >=3.10
Requires-Dist: esthien-argus-sdk>=1.0.0
Requires-Dist: pynacl>=1.5
Provides-Extra: dev
Requires-Dist: pytest>=8; extra == 'dev'
Description-Content-Type: text/markdown

# Argus Sentry

The Argus boundary for AI agents: one install that puts every tool call,
skill, MCP action, and agent-to-agent request of any model through Argus,
and makes executors refuse any action that lacks an Argus-signed capability
token.

## The four capabilities

1. **Enforcement** - every agent action evaluated against the operator's
   policy before it executes, with typed reason codes for every block.
2. **Evidence** - every decision signed into a tamper-evident Merkle +
   Ed25519 chain, verifiable offline with `argus evidence verify`.
3. **Abstention** - graded authority (full, scaled, safe-halt) instead of
   binary allow or deny, and INCONCLUSIVE fail-closed instead of a guess.
4. **The Record** - a signed deliberation record per action: what the agent
   proposed, what the gate saw, and what happened.

## Install

```
pip install argus-sentry
```

Requires the Argus SDK v0.8 line (`argus>=0.8`) and Python 3.10 or newer.

## Quickstart

Gate an MCP server in one command:

```
python -m argus_sentry.mcp.gateway \
  --server-id filesystem \
  --policy policy.txt \
  --policy-signer platform_policy_key_1 --policy-key <hex public key> \
  --class-map class_map.json \
  -- npx -y @modelcontextprotocol/server-filesystem /workspace
```

Wrap the server with token verification:

```
python -m argus_sentry.mcp.middleware \
  --server-id filesystem \
  --key-list key_list.bin \
  -- npx -y @modelcontextprotocol/server-filesystem /workspace
```

Model middleware:

```python
from argus_sentry.adapters.model import ModelGate, ModelToolCall

gate = ModelGate(core)  # core: a SentryCore with prefix "model"
outcome = gate.evaluate(ModelToolCall("openai", "delete_all_users", {}, "call-1"))
# outcome.decision == "deny", with the typed reason; nothing executes.
```

Evidence chain:

```python
from argus_sentry.evidence import SentryChainRecorder

chain = SentryChainRecorder(record_key=record_key, load_authority_key=load_key)
chain.start(policy_hash, policy_source=text)
# wire as the SentryCore recorder: every decision is signed into the chain
chain.export("gate_chain.json")
# then, offline: argus evidence verify gate_chain.json --level L2
```

## Contents

| Area | What ships |
|---|---|
| Token library | Capability tokens: issue, verify, revoke, replay protection; Python and TypeScript byte-identical to conformance vectors. |
| MCP adapter | Stdio gateway and drop-in server middleware with tool definition pinning. |
| Model adapters | OpenAI, Anthropic, and Google tool-calling middleware, one shared engine, identical decisions. |
| Framework hooks | LangGraph, OpenAI Agents SDK, CrewAI, AutoGen, and A2A. |
| Executor guards | Shell, file, database, and HTTP guards with incident replays. |
| Evidence chain | SentryChainRecorder with the third-party offline verification walkthrough. |
| Policy packs | Coding, customer support, browser, data, and robotics packs mapped to OWASP ASI01 to ASI10 and NIST agent identity controls. |

License: proprietary. See the repository for the specification, the
conformance matrix, and the verification walkthroughs.
