Skip to content

tracking: wasmagent-py — Python-native runtime protection layer (deferred, strategic decision needed) #100

Description

@telleroutlook

What this is

A strategic gap identified during an ecosystem audit (2026-07-18). Tracked here as an org-level reminder so it is not forgotten.

The gap

The WasmAgent ecosystem's runtime protection layer (mcp-firewall, taint tracking, policy enforcement, ApprovalPolicy) is entirely TypeScript/JS. It targets the JS/TS AI agent stack: Vercel AI SDK, Mastra, Cloudflare Agents SDK, bscode.

The dominant enterprise Python agent frameworks — LangChain, LlamaIndex, AutoGen, CrewAI — have no equivalent runtime protection. The only Python surface in the current ecosystem is a handful of AEP emitter example scripts. Python agents can use AEP for post-hoc auditing via open-agent-audit, but there is no equivalent of mcp-firewall (runtime interception, taint tracking, tool call policy enforcement) available to Python runtimes.

Why it is deferred

This is not a missing feature in the current scope — it is a strategic question about which user population to target:

  • If WasmAgent's primary positioning is as the trust layer for the JS/TS AI SDK ecosystem (Cloudflare Workers, Mastra, bscode pattern), Python coverage is out of scope and this remains a known gap.
  • If WasmAgent intends to expand to enterprise Python agent users (LangChain/AutoGen shops), a wasmagent-py project would need to be built from scratch. There is no Rust core to bind against (wasmagent-js is pure TypeScript); the implementation would need to be independent.

What wasmagent-py would need to do

To reach feature parity with the JS-side runtime layer:

  1. MCP firewall equivalent — intercept tool calls and return values, run prompt-injection detection, enforce consent/capability policy
  2. Taint tracking — propagate taint labels through tool return values into agent reasoning context
  3. ApprovalPolicy — gate high-risk tool calls (file write, delete, shell exec) pending human review, emit ApprovalRequest records to a shared store
  4. AEP emission — emit structured AEPEvent records compatible with @openagentaudit/schema so audit trail is unified across JS and Python agents
  5. Framework adapters — LangChain tool wrapper, LlamaIndex tool spec wrapper, AutoGen function call hook, CrewAI tool decorator

Implementation note

There is no shortcut via FFI or Wasm binding — wasmagent-js has no compiled native core. A wasmagent-py project would be a ground-up Python implementation sharing only the AEP JSON schema contract with the existing ecosystem.

Decision needed before starting

  • Confirm Python enterprise users are a target audience for WasmAgent
  • If yes: decide whether this is a new top-level repo (WasmAgent/wasmagent-py) or a packages/py subdirectory in wasmagent-js
  • Scope MVP: AEP emission only (thin) vs. full mcp-firewall parity (heavy)

Status

Deferred — no timeline. Revisit when strategic positioning is clarified.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions