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.0.tar.gz (37.9 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.0-py3-none-any.whl (32.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: moshe-0.1.0.tar.gz
  • Upload date:
  • Size: 37.9 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.0.tar.gz
Algorithm Hash digest
SHA256 f285ac71342bfc67adb9faaecd828e5ab4697f780cc8180507a9114913825b87
MD5 eaf0d400eeebd43168e0f063e72fc88a
BLAKE2b-256 fe9099baa29aeaf42eb76fe3c626b19c59e4aca0fae0a327ecd00761b73c328f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: moshe-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 67aefc697db629b9291d4976468cc60ece064011b885232a4733a72a61e87478
MD5 9fd91e3ae7c0b16d23d90c064fb8da81
BLAKE2b-256 c4f172fb472c34b411d6ca0088537ca2f33d4b482483a7c133b2a50dddc66341

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