SentiClaw
by @supertechgod
Runtime AI security for OpenClaw agents. Protects against prompt injection, identity spoofing, PII leakage, and runtime abuse. Drop-in 6-layer security middl...
Add to your OpenClaw workspace (HEARTBEAT.md or any tool):
from senticlaw import SentiClawsc = SentiClaw(config={
"owner_ids": {"discord": ["YOUR_DISCORD_USER_ID"]},
"trusted_senders": {"discord": ["YOUR_DISCORD_USER_ID"]},
})
Check inbound message
result = sc.check_inbound(text, sender_id=sender_id, channel="discord", session_id=session_id)
if not result.allowed:
return result.block_messageRun your agent logic here...
response = agent.respond(result.text)Check outbound response
safe = sc.check_outbound(response, session_id=session_id)
return safe.response
from senticlaw import SentiClaw, SentiClawConfigconfig = SentiClawConfig(
owner_ids={"discord": ["YOUR_ID"]},
trusted_senders={"discord": ["YOUR_ID"]},
block_unknown_senders=False,
redact_pii=True,
redact_secrets=True,
redaction_mode="mask", # mask | remove | tokenize
spend_cap_daily_usd=10.0,
max_messages_per_hour=100,
loop_threshold=3,
outbound_block_api_keys=True,
outbound_block_file_paths=True,
alert_channel_id="", # Discord channel ID for alerts
audit_db_path="senticlaw_audit.db",
)
clawhub install senticlaw