Skip to main content

flowise-agentmesh

AgentMesh governance nodes for Flowise — policy enforcement, trust gating, audit logging, and rate limiting for visual AI flows.

Deterministic, LLM-independent governance that plugs into any Flowise chatflow or agentflow.

What It Does

This package provides four governance nodes designed to sit inline within Flowise flows:

Node Purpose
GovernanceNode Evaluate tool calls against YAML policy (allowlist/blocklist, content patterns, argument scanning)
TrustGateNode Route agents to trust tiers (trusted / review / blocked) based on score thresholds
AuditNode Log all actions to a hash chain audit trail with SHA-256 tamper evidence
RateLimiterNode Token bucket rate limiting per agent and per action

All nodes are zero-dependency on LLMs, fully deterministic, and composable.

Installation

pip install flowise-agentmesh

Or install from source:

git clone https://github.com/microsoft/agent-governance-toolkit.git
cd agent-governance-python/agentmesh-integrations/flowise-agentmesh
pip install -e ".[dev]"

Quick Start

1. Define a Governance Policy (YAML)

# policy.yaml
allowed_tools:
  - search_*
  - read_file
blocked_tools:
  - rm_*
  - delete_*
blocked_content_patterns:
  - "DROP\\s+TABLE"
  - "rm\\s+-rf"
blocked_argument_patterns:
  - "\\.\\./"
  - "/etc/passwd"
default_action: deny

2. Use in Python (Custom Flowise Node)

from flowise_agentmesh import GovernanceNode, TrustGateNode, AuditNode, RateLimiterNode

# Governance check
gov = GovernanceNode(policy_path="policy.yaml")
result = gov.run({"tool": "search_web", "content": "latest news"})
# result["allowed"] == True

# Trust gate
gate = TrustGateNode(min_trust_score=0.7, review_threshold=0.4)
result = gate.run({"agent_id": "agent-1", "trust_score": 0.85})
# result["tier"] == "trusted"

# Audit logging
audit = AuditNode(storage="file", file_path="audit.jsonl", export_format="jsonl")
result = audit.run({"action": "search", "query": "hello"})
# result["chain_valid"] == True

# Rate limiting
limiter = RateLimiterNode(max_requests=10, window_seconds=60)
result = limiter.run({"agent_id": "agent-1", "action": "search"})
# result["allowed"] == True

Flowise Integration

Where These Nodes Fit in a Flow

┌─────────────┐    ┌─────────────────┐    ┌──────────────┐    ┌──────────┐
│  User Input  │───▶│  RateLimiterNode │───▶│ GovernanceNode│───▶│ LLM/Agent│
└─────────────┘    └─────────────────┘    └──────────────┘    └──────────┘
                                                │                    │
                                                ▼                    ▼
                                          ┌───────────┐      ┌───────────┐
                                          │ Block Flow │      │ AuditNode │
                                          └───────────┘      └───────────┘
                                                              │
                                                              ▼
                                                        ┌──────────────┐
                                                        │ TrustGateNode │
                                                        └──────────────┘
                                                         ╱      │      ╲
                                                        ▼       ▼       ▼
                                                    Trusted  Review  Blocked

Using as a Flowise Custom Node

Each node implements a run(input_data: dict) -> dict interface compatible with Flowise's custom node pattern:

Input: A dictionary from the previous node in the flow Output: A dictionary with the governance decision plus output key for the next node

Example run() return for GovernanceNode:

{
  "allowed": true,
  "reason": null,
  "tool": "search_web",
  "output": { "tool": "search_web", "content": "latest news" }
}

When blocked, output is null and reason explains why.

Example: Governance Pipeline

from flowise_agentmesh import GovernanceNode, TrustGateNode, AuditNode, RateLimiterNode

# Set up pipeline
limiter = RateLimiterNode(max_requests=100, window_seconds=60)
gov = GovernanceNode(policy_path="policy.yaml")
audit = AuditNode(storage="memory")
gate = TrustGateNode(min_trust_score=0.7)

def governance_pipeline(input_data: dict) -> dict:
    # Step 1: Rate limit
    rate_result = limiter.run(input_data)
    if not rate_result["allowed"]:
        return rate_result

    # Step 2: Policy check
    gov_result = gov.run(input_data)
    if not gov_result["allowed"]:
        audit.run({"decision": "blocked", **gov_result})
        return gov_result

    # Step 3: Audit log
    audit.run(input_data)

    # Step 4: Trust gate
    trust_result = gate.run(input_data)
    return trust_result

Components

GovernanceNode

Parameter Type Default Description
policy Policy | str | dict None Policy object, YAML string, or dict
policy_path str None Path to YAML policy file
strict_mode bool True Require at least one check input
log_level str "INFO" Logging level

TrustGateNode

Parameter Type Default Description
min_trust_score float 0.7 Minimum score for "trusted" tier
review_threshold float 0.4 Minimum score for "review" tier

AuditNode

Parameter Type Default Description
storage str "memory" Storage backend: memory or file
file_path str None File path (required when storage="file")
export_format str "json" Export format: json or jsonl

RateLimiterNode

Parameter Type Default Description
max_requests int 10 Maximum requests per window
window_seconds float 60.0 Time window in seconds

Development

pip install -e ".[dev]"
pytest tests/ -v

License

MIT

Metadata

Release files for flowise_agentmesh 3.6.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flowise_agentmesh 3.6.0
File Size Uploaded Provenance
flowise_agentmesh-3.6.0.tar.gz 10.6 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for flowise_agentmesh 3.6.0
File Interpreter ABI Platform
flowise_agentmesh-3.6.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.8 kB

Release files / flowise_agentmesh-3.6.0.tar.gz

Download URL flowise_agentmesh-3.6.0.tar.gz
Size 10.6 kB
Tags Source
SHA-256 checksum
How to use checksums
d1d52f3dc9a4b2d31ec6e9aa8ed4023635da49e33974cd5f1fec7cc3892cdbf9
BLAKE2b-256 checksum
How to use checksums
37b4b665619c9b6772070d783e2e5194036e815bace3703d7b9810165993097e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Release files / flowise_agentmesh-3.6.0-py3-none-any.whl

Download URL flowise_agentmesh-3.6.0-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
52dba363a3b63c8727d1aac92319bb6b00378ad4a8c10360f1cc14d10491caa1
BLAKE2b-256 checksum
How to use checksums
31886abed99d2a03aa6d4353cf955a33c456db92a2682baefff4d6792b2ff817
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via RestSharp/106.13.0.0

Security for flowise_agentmesh 3.6.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page