Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Hypothesise

A behavioural security layer for AI agents. Hypothesise watches every tool call your agents make — reading files, running commands, querying databases, calling APIs — learns what normal looks like for each agent, and flags the moment one starts behaving differently.

Permission systems ask "is this agent allowed to do that?" Hypothesise asks "is this normal for this agent?" An agent allowed to read .env and allowed to make web requests can do both in a row and leak your keys; every permission check passes. Hypothesise sees the chain.

Runs entirely on your machine. No account, no cloud, nothing leaves your computer.


Install

Needs Python 3.10+ on macOS, Windows or Linux. Install it as a command-line tool, in its own environment:

uv tool install hypothesise        # recommended
# or
pipx install hypothesise
# or, inside a virtualenv you manage
pip install hypothesise

Not on PyPI yet. Until the first release, install from a checkout of this repository instead: uv tool install /path/to/AI_Layer (or pipx install /path/to/AI_Layer).

Mind the spelling: hypothesise. hypothesis (a testing library) and hypothesize (a statistics package) are unrelated projects.

Connect your agents

hypothesise init

init finds the agent apps on your machine, shows exactly what it will change, and asks before changing anything:

App How it is connected What it sees
Claude Code a hook in ~/.claude/settings.json every tool: Bash, Read, Edit, WebFetch… and MCP tools
Claude Desktop each MCP server wrapped in place MCP tool calls
Cursor each MCP server wrapped in place + a hook in ~/.cursor/hooks.json every tool: built-in read/edit/terminal and MCP
Antigravity each MCP server wrapped in place (~/.gemini/config/mcp_config.json) MCP tool calls — its built-in tools have no hooks yet
VS Code (Copilot) each MCP server wrapped in place + a Copilot agent hook (~/.copilot/hooks/) every tool: built-in read/edit/terminal and MCP

Server names, tool names and settings stay exactly as they were. Every file is backed up first (~/.hypothesise/backups/). Restart the apps afterwards.

Prefer one entry that fronts several servers? The original setup still works and can sit beside init's wrapped servers. Put your servers in a hypothesise.config.json (same mcpServers shape as Claude/Cursor) and add one entry to the app's MCP config:

"hypothesise": {
  "type": "stdio",
  "command": "/absolute/path/to/python",
  "args": ["-m", "hypothesise", "proxy", "--config", "/absolute/path/hypothesise.config.json",
           "--detect", "--api", "http://127.0.0.1:8080"]
}

It ships live to the dashboard, catches chains across servers inline, and spools if the dashboard is closed. An old -m weaver proxy entry is upgraded to this form by hypothesise init.

Then use your agents as normal, and when you want to look (if port 8080 is taken — common on Windows — it picks the next free one and tells you):

hypothesise api          # dashboard at http://127.0.0.1:8080

The dashboard does not need to be running: everything is recorded locally and read in the next time you open it.

hypothesise status       # what is connected, what has been recorded
hypothesise uninstall    # put every config back exactly as it was
hypothesise api --demo   # just looking? sample attacks, in a separate demo database

What it does — and does not — do

  • Observe mode by default. A fresh install records and scores everything and blocks nothing. You see what it would have stopped before trusting it to stop anything.
  • Fails open. If Hypothesise breaks, your tools keep working — a wrapped server falls back to running unwrapped.
  • Every alert is a sentence, e.g. "read file:///app/.env (secret) at step 2, then external request to https://collector.example.net at step 3."
  • What it cannot see: Antigravity's built-in file, terminal and browser tools — it has no hooks, so only its MCP servers are watched. Claude Code, Copilot (needs chat.useHooks, on by default) and Cursor are covered by their hooks. Remote (HTTP) MCP servers are listed but not yet intercepted. Claude Code is covered completely through its hook.
  • Blocking is per server. A chain that crosses two MCP servers ("read a secret through one, send it out through another") is caught in the dashboard, not stopped live.

Where data lives

~/.hypothesise/ (set HYPOTHESISE_HOME to move it): the event spool, the dashboard database and config backups. Delete the folder to remove all data.


Development

bash scripts/dev-setup.sh                 # Windows: scripts\dev-setup.ps1
source .venv/bin/activate
pytest
python scripts/replay.py --all --quiet    # scenario suite
python redteam/run.py                     # red team
python scripts/ops/drills.py              # safety guarantees
Document What's in it
docs/PRIMER.md the whole project in ten minutes
docs/HYPOTHESISE.md the complete guide
docs/ARCHITECTURE.md design, graph schema, risk math
docs/DECISIONS.md why anything is the way it is (ADRs)
docs/OPERATIONS.md running it, releasing it

License

Licensed under the Apache License 2.0. Copyright 2026 Siddhant Shah.

Metadata

Release files for hypothesise 0.1.0a2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for hypothesise 0.1.0a2
File Size Uploaded
hypothesise-0.1.0a2.tar.gz 677.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for hypothesise 0.1.0a2
File Interpreter ABI Platform
hypothesise-0.1.0a2-py3-none-any.whl Python 3 none any Details

Total release size: 1.4 MB

Release files / hypothesise-0.1.0a2.tar.gz

Download URL hypothesise-0.1.0a2.tar.gz
Size 677.1 kB
Tags Source
SHA-256 checksum
How to use checksums
6a13f691b0bc3b5d123be6d776832fa5770f1e7947f86fddd79ac83a18f207d5
BLAKE2b-256 checksum
How to use checksums
6a3087b865ef2fed95f4fd4c5ea1d6e0a5eb9dc8d3755eae0bccc6239604f4b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release files / hypothesise-0.1.0a2-py3-none-any.whl

Download URL hypothesise-0.1.0a2-py3-none-any.whl
Size 708.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e74b47a617270704d33b50faad68af778100bdeec6637f2b7065b30a34ede9e8
BLAKE2b-256 checksum
How to use checksums
075a03bdb2fc1d28c3416bab5d79f500f4daf6cba7cee1b8eebb7316db5cfdf8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0a2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page