Skip to main content

Runtime security SDK for AI agents — policy enforcement, approval workflows, taint tracking, and chain-risk detection.

Project description

moshe

Python SDK for MosheSDK — runtime security for AI agents.

Installation

pip install moshe

Requires Python ≥ 3.11. Zero mandatory runtime dependencies.

Quick Start

from moshe import GenericAdapter, MemoryStore, Moshe, PolicyConfig

moshe = Moshe(
    policy=PolicyConfig(
        forbidden_commands=[r"rm\s+-rf"],
        forbidden_files=[".env"],
        sensitive_files=["id_rsa"],
    ),
    store=MemoryStore(),
    on_error="BLOCK",
    on_unhandled_review="BLOCK",
)

session = moshe.with_session("run-001")
adapter = GenericAdapter(session, framework="my-agent")

result = await adapter.wrap_command(
    command="ls -la",
    tool_name="shell",
    execute=lambda: run_shell("ls -la"),
)

Adapters

from moshe import OpenAIAdapter, AnthropicAdapter

# OpenAI tool calls
adapter = OpenAIAdapter(session)
result = await adapter.wrap_tool_call(tool_call=tc, execute=lambda: run(tc))

# Anthropic tool_use blocks
adapter = AnthropicAdapter(session)
result = await adapter.wrap_tool_use(tool_use=tu, execute=lambda: run(tu))

Documentation

See the root README for the full integration guide, feature overview, and use cases.

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

moshe-0.1.1.tar.gz (38.0 kB view details)

Uploaded Source

Built Distribution

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

moshe-0.1.1-py3-none-any.whl (32.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: moshe-0.1.1.tar.gz
  • Upload date:
  • Size: 38.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for moshe-0.1.1.tar.gz
Algorithm Hash digest
SHA256 9078e999796187e2cef0e252d65615284f805f716abde1b3f1991046eab8f7fb
MD5 c80dfd3156e8d18ecfbbb6d157b19d07
BLAKE2b-256 360d0f2b269fd85473552a3b2cc9bd5816554605a5f8ffd4f8b6722bf1cf3a1a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: moshe-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 32.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for moshe-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e76ebd3efae2da4aa4e79ec3a0e7e0c31bf596ebd8011fcdb2b3399dcb69dafe
MD5 37348519f611968f092f56b845a12986
BLAKE2b-256 6242a115481c140c5c9e7eba60f04f0e2e8316fd619b7e03c7e094521d9c2628

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