Autonomous AI Agents (RAG)
Required Access Level
Admin or Super Admin
What are AI Agents?
Unlike a classic Robot that executes only hardcoded rules (if/else), an AI Agent is a customizable cognitive persona. It acts as a "virtual" employee reading unstructured contexts such as text documents, making decisions, and submitting form values to drive BPMN business workflows forward in Flowi Agentic.
Example Personas:
- Invoice Auditor.
- Legal Document Reviewer.
- Support Analyst and Ticket Triage.
BYOK (Bring Your Own Key) Strategy
Flowi Agentic is designed as self-hosted Enterprise software. This means we do not charge any markup on your cognitive model API consumption, avoiding obscure markups on your AI tokens.
Each Tenant must configure and provide its own credentials (Bring Your Own Key) in the admin panel. Your AI operational costs will be billed directly by the original model providers (Google, OpenAI, Anthropic, etc.).
Configuring the Agent
Access Intelligence → Agents in the sidebar.
- Click Create New Agent.
- Fill in the B.Y.O.K details:
- Provider: OpenAI, Google Gemini, Anthropic, etc.
- API Key: Your access credential.
- Model: Which cognitive model to activate (e.g.,
gpt-4o,gemini-1.5-flash). - Temperature: (Degree of "creativity/freedom" in responses. For BPMN form autocomplete, we recommend
0.0or0.1to maintain logical precision).
- Design the Persona:
- System Prompt: Describe precisely who the agent is and the business rules to apply. E.g., "You are a senior financial analyst, always reject proposals submitted on weekends."
RAG Integration (Knowledge Bases)
Artificial Intelligence is much more powerful when paired with RAG (Retrieval-Augmented Generation). In Flowi Agentic, this is managed through the Knowledge Bases module:
- Base Management: Go to Knowledge in the admin area. You can create global bases (available system-wide) or tenant-specific bases.
- Workflow Linking: Knowledge base content (rules, policy manuals, guides) is not blindly injected. When designing a process (Workflow), go to the RAG tab and explicitly select which Knowledge Bases the process is permitted to access.
- Rule Injection (System Prompt): When a workflow triggers an
AiAgentDelegateservice task, the engine fetches descriptions of all linked Knowledge Bases and automatically injects the rules into the System Prompt. - Documents (Vector Search): Attached files (PDF manuals, text sheets) are chunked and converted into vector embeddings using
pgvector. During execution, the semantic content most similar to the current task variables is passed as supplementary context. This data never trains the public LLM.
Using AI Agents in Workflows
Once your Agent is configured (e.g., "Auditing Agent"), process architects (SUPER_ADMIN users) can use this agent in BPMN schemas by creating a Service Task mapped to AiAgentDelegate.
The Delegate will automatically gather dynamic variables from previous user form steps, concatenate them with linked Knowledge Bases rules, and send the request to the cognitive agent in real time.
Continuous Self-Learning Pipeline (Trends)
In addition to static Knowledge Bases (PDFs, Manuals), Flowi Agentic features a smart, automated Process Self-Learning engine.
How It Works (Hierarchical Distillation)
To ensure high scalability and prevent LLM context window explosion, learning is structured into three levels:
- Level 1 (Raw Data): The history of finished tasks and submitted variables is natively kept in Flowable's relational database.
- Level 2 (Micro-Analysis): When a defined batch size of completions is reached (e.g., every 10 completed tasks), the system aggregates these runs, calling the LLM to generate an anonymous, concise semantic summary of decisions and variables (Micro-Analysis).
- Level 3 (Macro-Trend in RAG): Periodically (according to the configuration), the system aggregates all micro-analyses within the sliding time window (e.g., the last 3 months) and compiles a Consolidated Trend Guideline into the vector store (pgvector).
When a user clicks 🪄 Fill with AI on a task form, the AI reads these stable, consolidated trend guidelines to predict and autocomplete fields with extreme precision.
Configuring Agent Learning
When editing or creating an AI Agent, you can customize continuous self-learning:
- Auto-Learning Enabled: Toggles task learning on/off.
- Time Window (Months): Defines how many months of recent history to consider (e.g., 3 months). This ensures the agent ignores obsolete patterns if your business rules changed recently.
- Batch Size: How many completed tasks to group before triggering an incremental micro-analysis (default: 10).
- Consolidation Periodicity: How often to publish the consolidated macro-trend to RAG (e.g., every 10 completed tasks, daily, weekly, etc.).