flowise-attesta package provides the Attesta Approval tool component for Flowise. It registers as a LangChain DynamicTool that an agent can invoke during a chatflow to evaluate actions for risk before execution.
Package:
flowise-attesta v0.1.0 | Language: TypeScript | Dependencies: @kyberon/attesta ^0.1.0 | Peers: flowise-components >=1.0.0, @langchain/core >=0.1.0Installation
Install the component
Copy the package into your Flowise custom components directory:Or install as a dependency in your custom Flowise components project:
Component Configuration
The Attesta Approval component exposes four inputs in the Flowise canvas:| Input | Type | Default | Description |
|---|---|---|---|
| Function Name | String | gated_action | Name of the action being gated (e.g., send_email, delete_record). This becomes the DynamicTool name. |
| Risk Level | Options | Auto (Score-based) | Override the risk level. Options: Auto, Low, Medium, High, Critical. |
| Risk Hints | JSON (advanced) | {} | JSON object of risk hints (e.g., {"destructive": true, "pii": true}). Invalid JSON is silently ignored. |
| Tool Description | String | A gated action that requires approval before execution | Description shown to the LLM. The agent uses this to decide when to call the tool. |
How It Works
The Flowise integration works differently from the n8n node. Instead of processing items in a data pipeline, it creates a LangChainDynamicTool that an agent can call during conversation:
Component Initialization
When the chatflow loads, Flowise calls the component’s
init() method. This creates a DynamicTool with the configured function name and description, and registers it with the agent. The component exports { nodeClass: AttestaGate } following Flowise convention.Agent Invocation
During a conversation, the LLM decides to call the tool. The tool receives a single string input from the agent.
Input Parsing
The tool attempts to parse the input as JSON. If parsing succeeds, the result is used as
kwargs. If it fails, the raw string is wrapped as { input: <raw string> }.Risk Evaluation
The tool builds an
ActionContext with environment: "production" and metadata: { source: "flowise" }, then passes it to attesta.evaluate().Because the component is a
DynamicTool, it is the agent (LLM) that decides whether to invoke it. The tool does not intercept other tools automatically. You should instruct the agent in its system prompt to call the Attesta Approval tool before performing risky actions.Output Format
The tool returns a JSON string to the agent. The agent can parse this to decide how to proceed.- Approved
- Denied
status field provides a simple check: "approved" or "denied". The verdict field contains the full Attesta verdict (approved, denied, modified, timed_out, or escalated). Note that approved responses include the parsed input and auditEntryId, while denied responses include a human-readable message instead.
Chatflow Examples
Example: Agent with Gated Email
Build a chatflow where an AI agent can send emails, but only after Attesta approves the action:- Add a ChatOpenAI (or any Chat Model) node and connect it to an Agent node.
- Add the Attesta Approval component as a Tool input to the Agent.
- Set Function Name to
send_emailand Tool Description to"Check approval before sending an email. Call this tool with the recipient and subject as JSON.". - Add your actual Send Email tool as another Tool input.
- In the Agent’s system prompt, instruct it to call the Attesta tool before using the send email tool.
Example: Gated Database Operations
High to force a comprehension quiz challenge, and add {"destructive": true} as Risk Hints to boost the risk score for any SQL mutations.
Chatflow Patterns
Pattern: Approval Before External API
Pattern: Multiple Gated Tools
You can add multiple Attesta Approval components with different function names and risk levels:Input Parsing
The tool receives a single string from the agent. It handles two formats:-
Valid JSON string: Parsed into a key-value object and passed as
kwargsto theActionContext. -
Non-JSON string: Wrapped in an
{ input: <raw string> }object.
Error Handling
Unlike the n8n integration, the Flowise component does not throw errors or stop the chatflow on denial. Instead, it always returns a JSON string:- The agent receives the denial message and can respond to the user accordingly (e.g., “I was unable to perform that action because it was flagged as high risk”).
- Invalid Risk Hints JSON is silently ignored (defaults to
{}), so the chatflow continues without interruption.
Peer Dependencies
The component requires the following peer dependencies:| Package | Version |
|---|---|
flowise-components | >=1.0.0 |
@langchain/core | >=0.1.0 |
@kyberon/attesta package is bundled as a direct dependency of flowise-attesta.
Related Pages
n8n Integration
Workflow node for n8n data pipelines
Langflow Integration
Python component for Langflow pipelines
Dify Integration
Plugin tool for the Dify platform
No-Code Overview
Compare all no-code platforms