Management and Normalization Agent (Supabase)
This flow acts as an intelligent validation and normalization layer between the user’s natural language and Supabase’s relational structure. The process ensures that each new furniture item inserted meets the required data integrity, eliminating
📄 Documentation – Management and Normalization Agent (Supabase)
🧩 Overview
The workflow orchestrates an AI‑powered agent that validates and normalises user‑provided furniture data before persisting it in a Supabase table. User queries are captured via a chat interface, processed by an advanced agent that uses a Google Generative AI model, and may invoke dedicated Supabase tools to read, insert, delete, or update records. The agent’s responses are then rendered back to the user through the chat output component.
⚙️ Main Features
- Captures user messages through a chat input component.
- Employs an advanced agent that can use a language model and a set of tools.
- Integrates a Google Generative AI model as the primary language model.
- Provides dedicated Supabase tools for Get, Delete, Insert, and Update operations.
- Validates input against a strict system prompt, ensuring data integrity before database writes.
- Returns processed results to the user via a chat output component.
🔄 Workflow Steps
| Component Name | Role in the Workflow | Key Inputs | Key Outputs |
|---|---|---|---|
| Chat Input | Receives the user’s message and session metadata. | Input Value (user text), Conversation ID, Session ID, optional Files. |
Message containing the user prompt. |
| Advanced Agent | Orchestrates the conversation, selects tools, and generates a final response. | arg_input (user message), llm (language model), tools (Supabase components). |
Response (message to be shown to the user). |
| Google Generative AI Model | Generates natural‑language responses and interprets system instructions. | input_value (prompt), system_message, temperature, max_output_tokens. |
text_output (model’s textual reply). |
| Supabase Component – Get | Retrieves furniture records based on filter criteria. | filter_string, limit, table_name (Muebles). |
Data (list of matching records). |
| Supabase Component – Delete | Removes records matching a filter. | filter_string, limit, table_name (Muebles). |
Data (confirmation of deletion). |
| Supabase Component – Insert | Adds a new furniture record with specified fields. | column_nombre, column_categoria, column_material, column_color, column_precio_venta, column_stock. |
Data (inserted record). |
| Supabase Component – Update | Modifies existing records matching a filter. | filter_string, field_update, update_1_field_name, update_1_value, …, update_6_field_name, update_6_value. |
Data (updated record). |
| Chat Output | Displays the agent’s final response to the user. | input_value (agent’s reply). |
Message shown in the chat interface. |
The Supabase components are invoked by the Advanced Agent as needed; they are not part of a strictly linear execution path.
🧠 Notes
- The system relies on a valid Google API key and a Supabase service key; both are required for the language model and database operations respectively.
- The Agent’s system prompt enforces strict formatting rules for categories, materials, colors, and mandatory fields, ensuring that only valid records reach the database.
- Tool calls (Get, Delete, Insert, Update) are available as part of the agent’s toolset; the agent selects them automatically based on the user’s intent.
- Batch mode is supported in the Supabase components via the
mapping_modeflag, allowing parallel processing of multiple items. - The workflow respects privacy and security controls, with optional PII detection and human‑in‑the‑loop capabilities (currently disabled).
- All components are configurable but the documentation focuses on the functional flow rather than internal parameter tuning.