Pre-release
This release is a pre-release and may not be stable for production use.
MoltWall Python SDK (Beta)
Real-time security firewall for AI agents — Python edition.
pip install moltwall
# with httpx for best performance:
pip install "moltwall[httpx]"
# with LangChain integration:
pip install "moltwall[langchain]"
Quickstart
from moltwall import MoltWall
wall = MoltWall(api_key="moltwall_live_...", base_url="https://www.moltwall.xyz")
result = wall.check(
agent_id="my-agent",
action="transfer_funds",
tool="wallet",
args={"amount": 100, "to": "0xabc..."},
source="user",
)
result.raise_if_blocked() # raises MoltWallBlockedError if denied
print(f"Decision: {result.decision} Risk: {result.risk_score:.2f} Latency: {result.latency_ms:.1f}ms")
LangChain Integration
from langchain_community.tools import ShellTool, WikipediaQueryRun
from moltwall import MoltWall
from moltwall.integrations.langchain import wrap_tools
wall = MoltWall(api_key="moltwall_live_...")
# Wrap all tools in one call
safe_tools = wrap_tools(
tools=[ShellTool(), WikipediaQueryRun()],
wall=wall,
agent_id="lc-agent-01",
source="agent",
)
# Drop-in replacement — same interface as original tools
from langchain.agents import create_react_agent
agent = create_react_agent(llm, safe_tools, prompt)
Error Handling
from moltwall import MoltWall, MoltWallBlockedError, MoltWallAuthError
try:
result = wall.check(agent_id="a1", action="delete_db", tool="sql", args={})
result.raise_if_blocked()
except MoltWallBlockedError as e:
print(f"Blocked: {e.response.reason}")
except MoltWallAuthError:
print("Invalid API key")
Links
Release files for moltwall 0.1.0b1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| moltwall-0.1.0b1.tar.gz | 6.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| moltwall-0.1.0b1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.1 kB
Release files / moltwall-0.1.0b1.tar.gz
| Download URL | moltwall-0.1.0b1.tar.gz |
|---|---|
| Size | 6.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e7bd1f4b5123c310cae9065cf291324e201647d61f6f4bb145e6a4a72bc94ef2
|
|
BLAKE2b-256 checksum How to use checksums |
ff11e9c46caab7062cc23c07558dbfa28fe4bbd8103e255b94337f24e7a08782
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.6
|
Release files / moltwall-0.1.0b1-py3-none-any.whl
| Download URL | moltwall-0.1.0b1-py3-none-any.whl |
|---|---|
| Size | 7.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9c37713b6ce51af4b9beae8d43ad965b324e8f9599468e7d48726796ff74eb54
|
|
BLAKE2b-256 checksum How to use checksums |
7acec7720154ebe642f121abbc4079b4c99b0042ce0dcbffb293e782dedaaf21
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.6
|