Skip to main content
Browse docs
By Audience
Getting Started
Configuration
Use Cases
IDE Integration
Third-Party Integrations
Engineering Cache
Console
API Reference
Gateway
Workflow Guides
Templates
Providers and SDKs
Industry Guides
Advanced Guides
Browse by Role
Deployment Guides
In-Depth Guides
Tutorials
FAQ

Flowise with Keeptrusts Gateway

Flowise is an open-source low-code platform for building LLM applications with a drag-and-drop visual interface. It supports chatbots, RAG pipelines, agents, and multi-step chains using LangChain components under the hood. By configuring Flowise's LLM nodes to route through the Keeptrusts gateway, every model interaction passes through your policy chain — prompt-injection detection, PII redaction, audit logging, cost attribution, and content filtering — without rebuilding your visual flows.

Use this page when

  • You are building Flowise chatflows and need governance on all LLM calls.
  • You want audit logging and cost attribution for Flowise applications.
  • You need to enforce compliance controls on visual LLM workflows.
  • You are deploying Flowise in a regulated environment with centralized policy enforcement.

Primary audience

  • Primary: Technical Engineers
  • Secondary: AI Agents, Technical Leaders

Prerequisites

  • Keeptrusts CLI installed and a gateway running locally or centrally (Quickstart).
  • Flowise instance running (self-hosted) with access to the flow editor.
  • Upstream provider API key (e.g. OpenAI) ready to configure.
  • A policy-config.yaml deployed to the gateway.

Configuration

Gateway policy config

A minimal config for governing Flowise traffic:

pack:
name: flowise-gateway
version: "1.0"

providers:
- name: openai
model: gpt-4o
secret_key_ref:
env: OPENAI_API_KEY

policies:
chain:
- prompt-injection
- pii-detector
- safety-filter
- quality-scorer

policy:
prompt-injection:
action: block
pii-detector:
action: redact
safety-filter:
action: block
quality-scorer:
threshold: 0.6

Start the gateway:

kt gateway run --policy-config policy-config.yaml

Flowise node configuration

Flowise's ChatOpenAI and other OpenAI-based nodes expose a Base Path field. Configure it to point at the Keeptrusts gateway.

  1. Open your Flowise chatflow in the visual editor.
  2. Select the ChatOpenAI node (or OpenAI node).
  3. In the node's configuration panel, set:
FieldValue
OpenAI API KeyYour OpenAI API key (via credential or direct input)
Base Pathhttp://localhost:41002/v1
Model Namegpt-4o
  1. Save the chatflow. All LLM calls from this node now route through the gateway.

Supported Flowise nodes

Once the Base Path is configured, the following Flowise nodes route through the gateway:

NodeDescription
ChatOpenAIChat completions for conversational chatflows
OpenAIText completions and generation
OpenAI EmbeddingsEmbedding generation (set Base Path on this node separately)
OpenAI Function AgentFunction-calling agent workflows
Conversational AgentMulti-turn agent with memory and tools

Each node must have its own Base Path configured, or use a shared credential with the gateway URL.

Example chatflow

A typical governed Flowise chatflow:

[Chat Trigger]

[Buffer Memory]

[ChatOpenAI] ← Base Path: http://localhost:41002/v1

[Output]

For RAG chatflows:

[Chat Trigger]

[Document Loader] → [Text Splitter] → [Vector Store]

[Retriever] → [Conversational Retrieval QA Chain]

[ChatOpenAI] ← Base Path: http://localhost:41002/v1

Setup steps

  1. Start the Keeptrusts gateway with your policy config.

    kt gateway run --policy-config policy-config.yaml
  2. Open Flowise and navigate to your chatflow.

  3. Select the ChatOpenAI node (or equivalent LLM node).

  4. Set the Base Path to http://localhost:41002/v1 in the node configuration.

  5. Save and test the chatflow — send a message and verify the request flows through the gateway.

  6. Verify in the Keeptrusts console — open Events to confirm requests appear with policy outcomes.

Verification

Check gateway health:

curl http://localhost:41002/keeptrusts/health

Send a test message in a Flowise chatflow and confirm:

  • Gateway logs show policy chain evaluation for the request.
  • The Keeptrusts console Events page shows the request with model, tokens, cost, and policy decisions.
  • The Flowise chatflow returns a response normally — the gateway is transparent.
  • Policy actions (allowed, blocked, redacted) are visible in the event detail.
PolicyPurposePhase
prompt-injectionBlock jailbreak attempts from chat usersInput
pii-detectorRedact PII before prompts reach the providerInput
safety-filterBlock harmful content in chat interactionsInput
dlp-filterPrevent sensitive data from leaving via LLM callsInput
quality-scorerScore and threshold response qualityOutput
citation-verifierVerify RAG responses are grounded in retrieved contextOutput
audit-loggerAttach audit metadata for every chatflow interactionInput

Troubleshooting

SymptomCauseFix
Flowise shows "Error connecting to model"Gateway is not reachable from FlowiseUse host.docker.internal or the Docker network hostname; verify the gateway is running
401 UnauthorizedAPI key mismatchVerify the API key in the Flowise node matches secret_key_ref.env in the gateway config
Chatflow responses are slowPolicy chain adds latency to LLM callsOptimize the policy chain or increase Flowise's request timeout in environment variables
Embedding calls bypass the gatewayOpenAI Embeddings node has a separate Base PathSet the Base Path on the embedding node as well
Events not appearing in Keeptrusts consoleGateway not connected to control planeSet KEEPTRUSTS_API_URL and KEEPTRUSTS_GATEWAY_TOKEN before starting the gateway

For AI systems

  • Canonical integration: Set the Base Path on Flowise ChatOpenAI nodes to http://localhost:41002/v1 or https://gateway.keeptrusts.com/v1.
  • The gateway is transparent — chatflows, agents, memory, RAG chains, and tool-calling nodes work unchanged.
  • Use Policy Controls Catalog for available policies.

For engineers

  • The only change is the Base Path field on LLM nodes. All chatflow structures, memory configurations, and tool connections remain unchanged.
  • Set the Base Path at the credential level to apply the gateway URL to all chatflows that share a credential.
  • Test with a simple chatflow first, then extend to RAG and agent flows.

For leaders

  • Flowise is often used by teams building internal chatbots. Keeptrusts provides governance without requiring visual flow changes.
  • Audit logging captures every chat interaction for compliance evidence.
  • Cost attribution tracks spend per chatflow, enabling budget management for AI-powered internal tools.

Next steps