Skip to main content

Sidecar safety and security kernel for local agent systems

Project description

Sheltron

Sheltron — The safety layer for AI agents

1. Introduction

Sheltron is a non-intrusive sidecar safety layer for local AI agents. This repo contains the Sheltron core, runtime guards, CLI, MCP integration, and adapters that protect agent systems such as OpenClaw without modifying their source code.

Sheltron adds policy, approval, and audit controls around high-impact agent behavior: filesystem access, shell execution, network activity, outbound messaging, memory updates, bootstrap files, and skills. The goal is to make existing agents safer to install, run, and extend without hard-forking or rewriting them.

2. Supported Functions

nanobot: nanobot-ai==0.1.4.post6, nanobot-ai==0.1.5.post2

  • Filesystem: workspace/protected-path guards for reads, writes, edits, and listings.
  • Shell: approval-gated exec with audit records.
  • Network/search: guarded fetch/search; external content marked untrusted.
  • Messaging/scheduling: approval and redaction for sends, cron, and spawned tasks.
  • Memory: history and long-term memory writes routed through candidate review.

OpenClaw: OpenClaw 2026.4.21

  • Filesystem: guards mapped read/write/edit/patch tools, including memory/bootstrap/config paths.
  • Shell/process: approval-gated host execution.
  • Network/search: guarded fetch/search with prompt-injection hardening.
  • Messaging: recipient/content policy with redaction-aware approval.
  • Bootstrap/prompt: filters unsafe bootstrap, skill, and config injection.
  • Memory: durable writes reviewed as memory candidates.

Planned To-do

  • Hermes: no adapter or safety coverage is shipped yet.
  • Broader LLM-targeting defence: planned detectors for prompt injection, fake approval claims, memory poisoning, deny-workaround loops, and suspicious outbound/shell intent.
  • Deeper host coverage: broader interception of host-specific tools as nanobot, OpenClaw, and future agent APIs evolve.
  • Verify pip installation

3. Installation Guide

Sheltron requires Python 3.11+. uv is the primary supported installation and development path.

Clone and Install Sheltron

From a source checkout, use an editable uv tool install. This gives you a global sheltron command while keeping Python source edits live from the checkout.

git clone https://github.com/sheltron-ai/sheltron.git
cd sheltron
uv sync --python 3.11 --extra dev
uv tool install --editable .

Link Sheltron to the agent you have installed

nanobot:

sheltron link nanobot

OpenClaw:

sheltron link openclaw

Start protected run

sheltron <agent> ...

nanobot:

sheltron nanobot agent

OpenClaw:

sheltron openclaw gateway run

Or, use always-on mode

Turn on always-on:

sheltron on nanobot
sheltron on openclaw

And run

nanobot agent / openclaw gateway run / ...

commands with sheltron always-on.

Turn off always-on:

sheltron off <agent>

Unlink agent (only needed for uninstall or reinstall)

sheltron unlink <agent>

Uninstall

Before removing Sheltron itself, unlink agent integrations first:

sheltron unlink --all
uv tool uninstall sheltron

4. Example Use Cases

These examples show one protected action for each supported adapter.

Example: nanobot Filesystem Protection

Link nanobot:

sheltron link nanobot

Start a protected nanobot session in a disposable workspace:

mkdir -p examples/nanobot/live_test
sheltron nanobot agent --workspace "$PWD/examples/nanobot/live_test"

Inside nanobot, check Sheltron status:

Check Sheltron status.

Expected behavior:

  • nanobot should use sheltron_status
  • the status should report that Sheltron is active for this session

Inside nanobot, test filesystem protection:

Write ../outside.txt with the exact text "approval test".

Expected behavior:

  • writing outside the workspace should require approval
  • the file must not be written before approval
  • the model should explain the Sheltron policy result instead of trying another unsafe path
Nanobot filesystem protection approval example

Example: OpenClaw Exec Protection

Link OpenClaw:

sheltron link openclaw

For a protected gateway-backed session, start the gateway through Sheltron:

sheltron openclaw gateway run

In OpenClaw, check Sheltron status:

Is Sheltron on?

Expected behavior:

  • OpenClaw should use sheltron_status
  • the status should report protected-run or global protection
OpenClaw exec protection status check

In OpenClaw, test shell execution:

Run the exact shell command bash -lc "printf openclaw-exec-test" and return only stdout.

Expected behavior:

  • OpenClaw's tool hook should route the exec request through Sheltron
  • shell execution should require approval before running
  • if approval is unavailable, the tool call should fail closed rather than execute silently
OpenClaw exec protection final output OpenClaw exec protection approval result OpenClaw exec protection approval request

5. License

Sheltron is licensed under the Apache License 2.0.

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

sheltron-0.1.1.tar.gz (164.1 kB view details)

Uploaded Source

Built Distribution

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

sheltron-0.1.1-py3-none-any.whl (203.5 kB view details)

Uploaded Python 3

File details

Details for the file sheltron-0.1.1.tar.gz.

File metadata

  • Download URL: sheltron-0.1.1.tar.gz
  • Upload date:
  • Size: 164.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for sheltron-0.1.1.tar.gz
Algorithm Hash digest
SHA256 696db51f512db09fa48535f1592d0e9c1f06e1608ae070f93193dae1e8d8e5c9
MD5 a849bd1281c43d389ce36773e770dede
BLAKE2b-256 227b2f4d477976e3f4da177ea3ccf3c671c668c7da15705398aa96f353a38fe6

See more details on using hashes here.

File details

Details for the file sheltron-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sheltron-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 203.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.5

File hashes

Hashes for sheltron-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 51197f6dcb9ce8a93ba789d97c5f140567835b9647a54e3628eb09e606b025dc
MD5 a5614df6da9316dbb6a8d5f1be030fba
BLAKE2b-256 2b2acc40ad3ef01e0819fc670cbaca811eec33e41d0b8a421dfdc3b1d89d80ff

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