Skip to main content

watchlight-claude-agent

Governed Claude Agent SDK agents with Watchlight — authorize every agent action, fail-closed, with zero infrastructure.

pip install watchlight-claude-agent

Independent third-party plugin. This is an independent integration built by Watchlight AI. It is not affiliated with, endorsed by, or sponsored by Anthropic. Claude Agent SDK and related names are trademarks of Anthropic, used here nominatively only to describe compatibility.

What it does

watchlight-claude-agent puts a Watchlight authorization decision in front of every action your Claude Agent SDK agent takes — tool calls, plan steps, and native sub-agent spawns — so each one is allowed, modified, or denied before it runs. It's open-source glue: a thin, framework-specific layer that threads Watchlight's governance primitives into your agent's hook loop. The actual policy decisions run on Watchlight's compiled engine, either in-process for local development or against the governed control plane in production.

Quickstart

Point the plugin at a backend and wrap your run. Your agent code doesn't change — only the backend does.

For local development, the zero-infrastructure Developer Edition runs the compiled engine in-process (requires the watchlight-engine package):

pip install watchlight-claude-agent watchlight-engine
from watchlight_claude_agent import WatchlightClaudeAgentSDKPlugin
from watchlight_core import InProcessClient

# A Cedar policy: the research agent may read, nothing else.
POLICIES = [
    {"name": "reader",
     "code": 'permit(principal == User::"research-agent", action == Action::"read", resource);'},
]

plugin = WatchlightClaudeAgentSDKPlugin()
plugin.apdp = InProcessClient(POLICIES)   # decisions run in-process, no server, no network

async def run_agent(question: str):
    async with await plugin.start_run("research-agent") as handle:
        # Validate a multi-step plan ahead of execution (Allow / Modify / Deny).
        result = await handle.submit_plan(["read dataset", "summarize"])
        if result.is_deny():
            raise PermissionError(f"Plan denied: {result.violations}")

        # Gate each action authoritatively. Returns True on Allow, False on Deny.
        if not await handle.authorize_action("read", "dataset"):
            raise PermissionError("Denied by policy")

        # ... your Claude agent runs, every action governed ...

authorize_action fails closed: a denial — or an unreachable backend — returns False, so the action never runs.

Two backends, same code

Backend Runs
Developer Edition InProcessClient The compiled engine, in-process — no server, no network
Enterprise ApdpClient The governed control plane — signed lineage, drift detection, fleet-wide governance

Moving from local to production is a one-line change:

from watchlight_core import ApdpClient

plugin = WatchlightClaudeAgentSDKPlugin()
plugin.apdp = ApdpClient("https://apdp.your-company.example", api_key="...")

Links

License

Apache-2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

watchlight_claude_agent-0.2.0.tar.gz (39.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

watchlight_claude_agent-0.2.0-py3-none-any.whl (25.7 kB view details)

Uploaded Python 3

File details

Details for the file watchlight_claude_agent-0.2.0.tar.gz.

File metadata

  • Download URL: watchlight_claude_agent-0.2.0.tar.gz
  • Upload date:
  • Size: 39.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for watchlight_claude_agent-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cb30c697b239556754ca1fad440f425498368205e047ac77869207d294cab1cf
MD5 9370448da620c6ea198e9889d7e47319
BLAKE2b-256 20123756a882af32cde24859e7394b79a6aa870983252c938996ffe140e1eb0f

See more details on using hashes here.

Provenance

The following attestation bundles were made for watchlight_claude_agent-0.2.0.tar.gz:

Publisher: publish-python-sdk-plugins.yml on watchlight-ai-beacon/watchlight-beacon

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file watchlight_claude_agent-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for watchlight_claude_agent-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 47a7da0361296416b3dafb7b6875d74107a038571f7799a7ad61058ecc0a2991
MD5 b31bbac651ed9b82345de81ec7ce03d7
BLAKE2b-256 420cc9d9cff8381e0d4c7499593085fed945802a3510b53e204994e2e44d3bdc

See more details on using hashes here.

Provenance

The following attestation bundles were made for watchlight_claude_agent-0.2.0-py3-none-any.whl:

Publisher: publish-python-sdk-plugins.yml on watchlight-ai-beacon/watchlight-beacon

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page