Skip to content

v0.1.0

Choose a tag to compare

@github-actions github-actions released this 15 Sep 07:35
· 9 commits to main since this release

v0.1.0 - First release on PyPI

A policy-bounded browser surface for agents, for Python. The Python port of particle-academy/prism-browser. The distribution is prism-ai-browser; the package imports as prism_browser.

pip install prism-ai-browser

What it has

  • BrowserPolicy checks every navigation and action before the engine receives it:
    • hosts are an allow-list, and *.example.org matches subdomains, not the apex;
    • HTTPS is required and only port 443 is allowed, by default;
    • URLs with credentials are refused;
    • private, loopback and link-local addresses are refused by default, including localhost and 169.254.169.254;
    • actions are an allow-list of click, fill, select, press, scroll and hover.
  • ObservationGuard refuses an observation over the size budget (65,536 bytes by default) rather than truncating it, and wraps page content in a tag with a random id so the page cannot close it.
  • GuardedBrowser wraps any BrowserEngine so every navigation and action goes through the policy and every observation through the guard.
  • Every refusal is a BrowserRefused with a stable code.
  • No runtime dependencies. Python 3.10 or later. The package does not drive a browser; you bring the engine.

Limits

The policy checks the URL as written. It does not resolve DNS, and it does not see redirects or anything the page loads. The engine must enforce those. The observation wrapper makes prompt injection harder, not impossible.

prism-parity's browser-url-policy corpus pins the URL policy against the PHP reference and the TypeScript port.