Skip to main content

The open-source core for AI agent security and compliance

Project description

suprawall

The security gateway for AI agents. Enforce authentication, rate limiting, and policy controls between users and AI agents — in one line of code.

Install

pip install suprawall-sdk

With LangChain:

pip install "suprawall-sdk[langchain]"

With OpenAI Agents SDK:

pip install "suprawall-sdk[openai]"

Everything:

pip install "suprawall-sdk[all]"

Quickstart

Get your free API key at https://www.supra-wall.com/

Any agent (generic)

from suprawall import with_suprawall, SupraWallOptions

secured = with_suprawall(my_agent, SupraWallOptions(
    api_key="ag_your_key_here"
))
result = secured.run("delete_file", {"path": "/etc/passwd"})

LangChain

from suprawall import SupraWallLangChainCallback, SupraWallOptions
from langchain.agents import AgentExecutor

callback = SupraWallLangChainCallback(
    SupraWallOptions(api_key="ag_your_key_here")
)
agent_executor = AgentExecutor(
    agent=agent,
    tools=tools,
    callbacks=[callback],
)

OpenAI Agents SDK

from suprawall import wrap_openai_agent, SupraWallOptions
from agents import Agent, Runner

secured = wrap_openai_agent(agent, SupraWallOptions(
    api_key="ag_your_key_here"
))
result = await Runner.run(secured, "Send email to all users")

smolagents

from suprawall import wrap_smolagents, SupraWallOptions
from smolagents import CodeAgent

secured = wrap_smolagents(agent, SupraWallOptions(
    api_key="ag_your_key_here"
))
result = secured.run("Search for sensitive files")

MCP middleware

from suprawall import SupraWallMiddleware, SupraWallOptions

gate = SupraWallMiddleware(SupraWallOptions(api_key="ag_your_key_here"))

# Inline check
result = gate.check("send_email", args, lambda: send_email(args))

# As a decorator
@gate.guard()
def delete_user(user_id: str):
    ...

Fail-open vs Fail-closed

# Development (default)
SupraWallOptions(api_key="ag_xxx", on_network_error="fail-open")

# Production (recommended)
SupraWallOptions(api_key="ag_xxx", on_network_error="fail-closed")

Policy decisions

Decision Behaviour
ALLOW Tool executes normally
DENY Tool blocked, error string returned
REQUIRE_APPROVAL Tool paused, human approves in dashboard

Links

Dashboard: https://www.supra-wall.com/ GitHub: https://github.com/wiserautomation/suprawall Issues: https://github.com/wiserautomation/suprawall/issues

Project details


Download files

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

Source Distribution

suprawall_sdk-1.1.1.tar.gz (27.2 kB view details)

Uploaded Source

Built Distribution

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

suprawall_sdk-1.1.1-py3-none-any.whl (36.2 kB view details)

Uploaded Python 3

File details

Details for the file suprawall_sdk-1.1.1.tar.gz.

File metadata

  • Download URL: suprawall_sdk-1.1.1.tar.gz
  • Upload date:
  • Size: 27.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for suprawall_sdk-1.1.1.tar.gz
Algorithm Hash digest
SHA256 0a567a78ba5f957f907c403c2222a2b2b75ee5586456d1a45757935e9fe26c18
MD5 358d37a4c54e1adf2ff8d29da6418f49
BLAKE2b-256 cf8441b39da7b7c8ca3ed0022adb2419c572045dd56eb74f1b4cffbec8f3ec75

See more details on using hashes here.

File details

Details for the file suprawall_sdk-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: suprawall_sdk-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 36.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for suprawall_sdk-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 502244989041887ce01991b4aa072034c15d5fd69fc0df22e08d95409a71c81c
MD5 a26ad2e8ec2a0cfd589a56d168e3e45a
BLAKE2b-256 cfd86fd1acbc613a61cbf797d27acafc4d748715309b7ae0f464c8b7527ebcf4

See more details on using hashes here.

Supported by

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