{
  "id": "019b0830-219e-4b74-b4e1-0b662e28de5f",
  "data": {
    "nodes": [
      {
        "id": "CustomComponent-rvzAl",
        "type": "genericNode",
        "position": {
          "x": -569.8552060027972,
          "y": 166.49085050046935
        },
        "data": {
          "node": {
            "template": {
              "_type": "Component",
              "api_id": {
                "load_from_db": false,
                "required": true,
                "placeholder": "",
                "show": true,
                "name": "api_id",
                "value": "",
                "display_name": "API ID",
                "advanced": false,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "Your SheetDB API ID (e.g., 58f61be4dda40).",
                "title_case": false,
                "password": true,
                "type": "str",
                "_input_type": "SecretStrInput"
              },
              "cast_numbers": {
                "trace_as_metadata": true,
                "load_from_db": false,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "cast_numbers",
                "value": "",
                "display_name": "Cast Numbers",
                "advanced": false,
                "dynamic": false,
                "info": "Comma-separated column names to cast as numbers.",
                "title_case": false,
                "type": "str",
                "_input_type": "StrInput"
              },
              "code": {
                "type": "code",
                "required": true,
                "placeholder": "",
                "list": false,
                "show": true,
                "multiline": true,
                "value": "import requests\r\nfrom typing import Dict, Any, List, Optional\r\nfrom pydantic import BaseModel, Field\r\nfrom langchain.tools import StructuredTool\r\nfrom langflow.base.langchain_utilities.model import LCToolComponent\r\nfrom langflow.field_typing import Data, Tool\r\nfrom langflow.inputs import SecretStrInput, StrInput, IntInput, DropdownInput\r\n\r\n\r\nclass SheetDBReadToolComponent(LCToolComponent):\r\n    display_name = \"Sheet DB io\"\r\n    description = \"Reads data from a Google Sheet using SheetDB API.\"\r\n    documentation = \"https://sheetdb.io/documentation\"\r\n    icon = \"table\"\r\n    name = \"SheetDBReader\"\r\n\r\n    inputs = [\r\n        SecretStrInput(\r\n            name=\"api_id\",\r\n            display_name=\"API ID\",\r\n            info=\"Your SheetDB API ID (e.g., 58f61be4dda40).\",\r\n            required=True,\r\n        ),\r\n        StrInput(\r\n            name=\"sheet\",\r\n            display_name=\"Sheet Name\",\r\n            required=False,\r\n        ),\r\n        IntInput(\r\n            name=\"limit\",\r\n            display_name=\"Limit\",\r\n            required=False,\r\n        ),\r\n        IntInput(\r\n            name=\"offset\",\r\n            display_name=\"Offset\",\r\n            required=False,\r\n        ),\r\n        StrInput(\r\n            name=\"sort_by\",\r\n            display_name=\"Sort By\",\r\n            required=False,\r\n        ),\r\n        DropdownInput(\r\n            name=\"sort_order\",\r\n            display_name=\"Sort Order\",\r\n            options=[\"asc\", \"desc\", \"random\"],\r\n            required=False,\r\n        ),\r\n        StrInput(\r\n            name=\"cast_numbers\",\r\n            display_name=\"Cast Numbers\",\r\n            info=\"Comma-separated column names to cast as numbers.\",\r\n            required=False,\r\n        ),\r\n    ]\r\n\r\n    class SheetDBReadSchema(BaseModel):\r\n        sheet: Optional[str] = Field(None)\r\n        limit: Optional[int] = Field(None)\r\n        offset: Optional[int] = Field(None)\r\n        sort_by: Optional[str] = Field(None)\r\n        sort_order: Optional[str] = Field(None)\r\n        cast_numbers: Optional[str] = Field(None)\r\n\r\n    def _read_sheetdb(\r\n        self,\r\n        sheet: Optional[str] = None,\r\n        limit: Optional[int] = None,\r\n        offset: Optional[int] = None,\r\n        sort_by: Optional[str] = None,\r\n        sort_order: Optional[str] = None,\r\n        cast_numbers: Optional[str] = None,\r\n    ) -> List[Data]:\r\n        url = f\"https://sheetdb.io/api/v1/{self.api_id}\"\r\n        params = {}\r\n\r\n        if sheet:\r\n            params[\"sheet\"] = sheet\r\n        if limit:\r\n            params[\"limit\"] = str(limit)\r\n        if offset:\r\n            params[\"offset\"] = str(offset)\r\n        if sort_by:\r\n            params[\"sort_by\"] = sort_by\r\n        if sort_order:\r\n            params[\"sort_order\"] = sort_order\r\n        if cast_numbers:\r\n            params[\"cast_numbers\"] = cast_numbers\r\n\r\n        try:\r\n            response = requests.get(url, params=params)\r\n            response.raise_for_status()\r\n            result = response.json()\r\n\r\n            # Corrige erro: SheetDB pode retornar lista, mas Langflow espera dict\r\n            if isinstance(result, list):\r\n                return [Data(data={\"items\": result})]\r\n            else:\r\n                return [Data(data=result)]\r\n\r\n        except Exception as e:\r\n            return [Data(data={\"error\": str(e)})]\r\n\r\n    def build_tool(self) -> Tool:\r\n        return StructuredTool.from_function(\r\n            name=\"read_sheetdb_data\",\r\n            description=\"Fetches data from a SheetDB spreadsheet with optional sorting and filtering.\",\r\n            func=self._read_sheetdb,\r\n            args_schema=self.SheetDBReadSchema,\r\n        )\r\n\r\n    def run_model(self) -> List[Data]:\r\n        return self._read_sheetdb(\r\n            sheet=self.sheet,\r\n            limit=self.limit,\r\n            offset=self.offset,\r\n            sort_by=self.sort_by,\r\n            sort_order=self.sort_order,\r\n            cast_numbers=self.cast_numbers,\r\n        )\r\n",
                "fileTypes": [],
                "file_path": "",
                "password": false,
                "name": "code",
                "advanced": true,
                "dynamic": true,
                "info": "",
                "load_from_db": false,
                "title_case": false
              },
              "limit": {
                "trace_as_metadata": true,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "limit",
                "value": 3,
                "display_name": "Limit",
                "advanced": false,
                "dynamic": false,
                "info": "",
                "title_case": false,
                "type": "int",
                "_input_type": "IntInput",
                "load_from_db": false
              },
              "offset": {
                "trace_as_metadata": true,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "offset",
                "value": "",
                "display_name": "Offset",
                "advanced": false,
                "dynamic": false,
                "info": "",
                "title_case": false,
                "type": "int",
                "_input_type": "IntInput"
              },
              "sheet": {
                "trace_as_metadata": true,
                "load_from_db": false,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "sheet",
                "value": "",
                "display_name": "Sheet Name",
                "advanced": false,
                "dynamic": false,
                "info": "",
                "title_case": false,
                "type": "str",
                "_input_type": "StrInput"
              },
              "sort_by": {
                "trace_as_metadata": true,
                "load_from_db": false,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "sort_by",
                "value": "",
                "display_name": "Sort By",
                "advanced": false,
                "dynamic": false,
                "info": "",
                "title_case": false,
                "type": "str",
                "_input_type": "StrInput"
              },
              "sort_order": {
                "tool_mode": false,
                "trace_as_metadata": true,
                "options": [
                  "asc",
                  "desc",
                  "random"
                ],
                "combobox": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "sort_order",
                "value": "",
                "display_name": "Sort Order",
                "advanced": false,
                "dynamic": false,
                "info": "",
                "title_case": false,
                "type": "str",
                "_input_type": "DropdownInput"
              }
            },
            "description": "Reads data from a Google Sheet using SheetDB API.",
            "icon": "table",
            "base_classes": [
              "Data",
              "Tool"
            ],
            "display_name": "Reads all data - SheetDB",
            "documentation": "https://sheetdb.io/documentation",
            "custom_fields": {},
            "output_types": [],
            "pinned": false,
            "conditional_paths": [],
            "frozen": false,
            "outputs": [
              {
                "types": [
                  "Data"
                ],
                "selected": "Data",
                "name": "api_run_model",
                "display_name": "Data",
                "method": "run_model",
                "value": "__UNDEFINED__",
                "cache": true,
                "required_inputs": [
                  "api_id"
                ]
              },
              {
                "types": [
                  "Tool"
                ],
                "selected": "Tool",
                "name": "api_build_tool",
                "display_name": "Tool",
                "method": "build_tool",
                "value": "__UNDEFINED__",
                "cache": true,
                "required_inputs": [
                  "api_id"
                ]
              }
            ],
            "field_order": [
              "api_id",
              "sheet",
              "limit",
              "offset",
              "sort_by",
              "sort_order",
              "cast_numbers"
            ],
            "beta": false,
            "legacy": false,
            "edited": true,
            "metadata": {},
            "tool_mode": false,
            "lf_version": "1.1.1"
          },
          "type": "CustomComponent",
          "id": "CustomComponent-rvzAl"
        },
        "selected": false,
        "width": 320,
        "height": 815,
        "positionAbsolute": {
          "x": -569.8552060027972,
          "y": 166.49085050046935
        },
        "dragging": false
      },
      {
        "id": "Agent-XtQp3",
        "type": "genericNode",
        "position": {
          "x": 823.4221991899246,
          "y": 80.89232362913731
        },
        "data": {
          "node": {
            "template": {
              "_type": "Component",
              "memory": {
                "trace_as_metadata": true,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "memory",
                "value": "",
                "display_name": "External Memory",
                "advanced": true,
                "input_types": [
                  "BaseChatMessageHistory"
                ],
                "dynamic": false,
                "info": "Retrieve messages from an external memory. If empty, it will use the Langflow tables.",
                "title_case": false,
                "type": "other",
                "_input_type": "HandleInput"
              },
              "output_parser": {
                "trace_as_metadata": true,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "output_parser",
                "value": "",
                "display_name": "Output Parser",
                "advanced": true,
                "input_types": [
                  "OutputParser"
                ],
                "dynamic": false,
                "info": "The parser to use to parse the output of the model",
                "title_case": false,
                "type": "other",
                "_input_type": "HandleInput"
              },
              "tools": {
                "trace_as_metadata": true,
                "list": true,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "tools",
                "value": "",
                "display_name": "Tools",
                "advanced": false,
                "input_types": [
                  "Tool",
                  "BaseTool",
                  "StructuredTool"
                ],
                "dynamic": false,
                "info": "These are the tools that the agent can use to help with tasks.",
                "title_case": false,
                "type": "other",
                "_input_type": "HandleInput"
              },
              "add_current_date_tool": {
                "trace_as_metadata": true,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "add_current_date_tool",
                "value": true,
                "display_name": "Add tool Current Date",
                "advanced": true,
                "dynamic": false,
                "info": "If true, will add a tool to the agent that returns the current date.",
                "title_case": false,
                "type": "bool",
                "_input_type": "BoolInput"
              },
              "agent_description": {
                "tool_mode": false,
                "trace_as_input": true,
                "multiline": true,
                "trace_as_metadata": true,
                "load_from_db": false,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "agent_description",
                "value": "A helpful assistant with access to the following tools:",
                "display_name": "Agent Description",
                "advanced": true,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "The description of the agent. This is only used when in Tool Mode. Defaults to 'A helpful assistant with access to the following tools:' and tools are added dynamically.",
                "title_case": false,
                "type": "str",
                "_input_type": "MultilineInput"
              },
              "agent_llm": {
                "tool_mode": false,
                "trace_as_metadata": true,
                "options": [
                  "Amazon Bedrock",
                  "Anthropic",
                  "Azure OpenAI",
                  "Groq",
                  "NVIDIA",
                  "OpenAI",
                  "Custom"
                ],
                "combobox": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "agent_llm",
                "value": "OpenAI",
                "display_name": "Model Provider",
                "advanced": false,
                "input_types": [],
                "dynamic": false,
                "info": "The provider of the language model that the agent will use to generate responses.",
                "real_time_refresh": true,
                "title_case": false,
                "type": "str",
                "_input_type": "DropdownInput"
              },
              "api_key": {
                "load_from_db": true,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "api_key",
                "value": "",
                "display_name": "OpenAI API Key",
                "advanced": false,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "The OpenAI API Key to use for the OpenAI model.",
                "title_case": false,
                "password": true,
                "type": "str",
                "_input_type": "SecretStrInput"
              },
              "code": {
                "type": "code",
                "required": true,
                "placeholder": "",
                "list": false,
                "show": true,
                "multiline": true,
                "value": "from langchain_core.tools import StructuredTool\n\nfrom langflow.base.agents.agent import LCToolsAgentComponent\nfrom langflow.base.models.model_input_constants import ALL_PROVIDER_FIELDS, MODEL_PROVIDERS_DICT\nfrom langflow.base.models.model_utils import get_model_name\nfrom langflow.components.helpers import CurrentDateComponent\nfrom langflow.components.helpers.memory import MemoryComponent\nfrom langflow.components.langchain_utilities.tool_calling import ToolCallingAgentComponent\nfrom langflow.io import BoolInput, DropdownInput, MultilineInput, Output\nfrom langflow.schema.dotdict import dotdict\nfrom langflow.schema.message import Message\n\n\ndef set_advanced_true(component_input):\n    component_input.advanced = True\n    return component_input\n\n\nclass AgentComponent(ToolCallingAgentComponent):\n    display_name: str = \"Agent\"\n    description: str = \"Define the agent's instructions, then enter a task to complete using tools.\"\n    icon = \"bot\"\n    beta = False\n    name = \"Agent\"\n\n    memory_inputs = [set_advanced_true(component_input) for component_input in MemoryComponent().inputs]\n\n    inputs = [\n        DropdownInput(\n            name=\"agent_llm\",\n            display_name=\"Model Provider\",\n            info=\"The provider of the language model that the agent will use to generate responses.\",\n            options=[*sorted(MODEL_PROVIDERS_DICT.keys()), \"Custom\"],\n            value=\"OpenAI\",\n            real_time_refresh=True,\n            input_types=[],\n        ),\n        *MODEL_PROVIDERS_DICT[\"OpenAI\"][\"inputs\"],\n        MultilineInput(\n            name=\"system_prompt\",\n            display_name=\"Agent Instructions\",\n            info=\"System Prompt: Initial instructions and context provided to guide the agent's behavior.\",\n            value=\"You are a helpful assistant that can use tools to answer questions and perform tasks.\",\n            advanced=False,\n        ),\n        *LCToolsAgentComponent._base_inputs,\n        *memory_inputs,\n        BoolInput(\n            name=\"add_current_date_tool\",\n            display_name=\"Add tool Current Date\",\n            advanced=True,\n            info=\"If true, will add a tool to the agent that returns the current date.\",\n            value=True,\n        ),\n    ]\n    outputs = [Output(name=\"response\", display_name=\"Response\", method=\"message_response\")]\n\n    async def message_response(self) -> Message:\n        llm_model, display_name = self.get_llm()\n        self.model_name = get_model_name(llm_model, display_name=display_name)\n        if llm_model is None:\n            msg = \"No language model selected\"\n            raise ValueError(msg)\n        self.chat_history = self.get_memory_data()\n\n        if self.add_current_date_tool:\n            if not isinstance(self.tools, list):  # type: ignore[has-type]\n                self.tools = []\n            # Convert CurrentDateComponent to a StructuredTool\n            current_date_tool = CurrentDateComponent().to_toolkit()[0]\n            if isinstance(current_date_tool, StructuredTool):\n                self.tools.append(current_date_tool)\n            else:\n                msg = \"CurrentDateComponent must be converted to a StructuredTool\"\n                raise ValueError(msg)\n\n        if not self.tools:\n            msg = \"Tools are required to run the agent.\"\n            raise ValueError(msg)\n        self.set(\n            llm=llm_model,\n            tools=self.tools,\n            chat_history=self.chat_history,\n            input_value=self.input_value,\n            system_prompt=self.system_prompt,\n        )\n        agent = self.create_agent_runnable()\n        return await self.run_agent(agent)\n\n    def get_memory_data(self):\n        memory_kwargs = {\n            component_input.name: getattr(self, f\"{component_input.name}\") for component_input in self.memory_inputs\n        }\n\n        return MemoryComponent().set(**memory_kwargs).retrieve_messages()\n\n    def get_llm(self):\n        if isinstance(self.agent_llm, str):\n            try:\n                provider_info = MODEL_PROVIDERS_DICT.get(self.agent_llm)\n                if provider_info:\n                    component_class = provider_info.get(\"component_class\")\n                    display_name = component_class.display_name\n                    inputs = provider_info.get(\"inputs\")\n                    prefix = provider_info.get(\"prefix\", \"\")\n                    return self._build_llm_model(component_class, inputs, prefix), display_name\n            except Exception as e:\n                msg = f\"Error building {self.agent_llm} language model\"\n                raise ValueError(msg) from e\n        return self.agent_llm, None\n\n    def _build_llm_model(self, component, inputs, prefix=\"\"):\n        model_kwargs = {input_.name: getattr(self, f\"{prefix}{input_.name}\") for input_ in inputs}\n        return component.set(**model_kwargs).build_model()\n\n    def delete_fields(self, build_config: dotdict, fields: dict | list[str]) -> None:\n        \"\"\"Delete specified fields from build_config.\"\"\"\n        for field in fields:\n            build_config.pop(field, None)\n\n    def update_input_types(self, build_config: dotdict) -> dotdict:\n        \"\"\"Update input types for all fields in build_config.\"\"\"\n        for key, value in build_config.items():\n            if isinstance(value, dict):\n                if value.get(\"input_types\") is None:\n                    build_config[key][\"input_types\"] = []\n            elif hasattr(value, \"input_types\") and value.input_types is None:\n                value.input_types = []\n        return build_config\n\n    def update_build_config(self, build_config: dotdict, field_value: str, field_name: str | None = None) -> dotdict:\n        # Iterate over all providers in the MODEL_PROVIDERS_DICT\n        # Existing logic for updating build_config\n        if field_name == \"agent_llm\":\n            provider_info = MODEL_PROVIDERS_DICT.get(field_value)\n            if provider_info:\n                component_class = provider_info.get(\"component_class\")\n                if component_class and hasattr(component_class, \"update_build_config\"):\n                    # Call the component class's update_build_config method\n                    build_config = component_class.update_build_config(build_config, field_value, field_name)\n\n            provider_configs: dict[str, tuple[dict, list[dict]]] = {\n                provider: (\n                    MODEL_PROVIDERS_DICT[provider][\"fields\"],\n                    [\n                        MODEL_PROVIDERS_DICT[other_provider][\"fields\"]\n                        for other_provider in MODEL_PROVIDERS_DICT\n                        if other_provider != provider\n                    ],\n                )\n                for provider in MODEL_PROVIDERS_DICT\n            }\n            if field_value in provider_configs:\n                fields_to_add, fields_to_delete = provider_configs[field_value]\n\n                # Delete fields from other providers\n                for fields in fields_to_delete:\n                    self.delete_fields(build_config, fields)\n\n                # Add provider-specific fields\n                if field_value == \"OpenAI\" and not any(field in build_config for field in fields_to_add):\n                    build_config.update(fields_to_add)\n                else:\n                    build_config.update(fields_to_add)\n                # Reset input types for agent_llm\n                build_config[\"agent_llm\"][\"input_types\"] = []\n            elif field_value == \"Custom\":\n                # Delete all provider fields\n                self.delete_fields(build_config, ALL_PROVIDER_FIELDS)\n                # Update with custom component\n                custom_component = DropdownInput(\n                    name=\"agent_llm\",\n                    display_name=\"Language Model\",\n                    options=[*sorted(MODEL_PROVIDERS_DICT.keys()), \"Custom\"],\n                    value=\"Custom\",\n                    real_time_refresh=True,\n                    input_types=[\"LanguageModel\"],\n                )\n                build_config.update({\"agent_llm\": custom_component.to_dict()})\n            # Update input types for all fields\n            build_config = self.update_input_types(build_config)\n\n            # Validate required keys\n            default_keys = [\n                \"code\",\n                \"_type\",\n                \"agent_llm\",\n                \"tools\",\n                \"input_value\",\n                \"add_current_date_tool\",\n                \"system_prompt\",\n                \"agent_description\",\n                \"max_iterations\",\n                \"handle_parsing_errors\",\n                \"verbose\",\n            ]\n            missing_keys = [key for key in default_keys if key not in build_config]\n            if missing_keys:\n                msg = f\"Missing required keys in build_config: {missing_keys}\"\n                raise ValueError(msg)\n        if isinstance(self.agent_llm, str) and self.agent_llm in MODEL_PROVIDERS_DICT:\n            provider_info = MODEL_PROVIDERS_DICT.get(self.agent_llm)\n            if provider_info:\n                component_class = provider_info.get(\"component_class\")\n                prefix = provider_info.get(\"prefix\")\n                if component_class and hasattr(component_class, \"update_build_config\"):\n                    # Call each component class's update_build_config method\n                    # remove the prefix from the field_name\n                    if isinstance(field_name, str) and isinstance(prefix, str):\n                        field_name = field_name.replace(prefix, \"\")\n                    build_config = component_class.update_build_config(build_config, field_value, field_name)\n\n        return build_config\n",
                "fileTypes": [],
                "file_path": "",
                "password": false,
                "name": "code",
                "advanced": true,
                "dynamic": true,
                "info": "",
                "load_from_db": false,
                "title_case": false
              },
              "handle_parsing_errors": {
                "trace_as_metadata": true,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "handle_parsing_errors",
                "value": true,
                "display_name": "Handle Parse Errors",
                "advanced": true,
                "dynamic": false,
                "info": "Should the Agent fix errors when reading user input for better processing?",
                "title_case": false,
                "type": "bool",
                "_input_type": "BoolInput"
              },
              "input_value": {
                "tool_mode": true,
                "trace_as_input": true,
                "trace_as_metadata": true,
                "load_from_db": false,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "input_value",
                "value": "",
                "display_name": "Input",
                "advanced": false,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "The input provided by the user for the agent to process.",
                "title_case": false,
                "type": "str",
                "_input_type": "MessageTextInput"
              },
              "json_mode": {
                "trace_as_metadata": true,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "json_mode",
                "value": false,
                "display_name": "JSON Mode",
                "advanced": true,
                "dynamic": false,
                "info": "If True, it will output JSON regardless of passing a schema.",
                "title_case": false,
                "type": "bool",
                "_input_type": "BoolInput"
              },
              "max_iterations": {
                "trace_as_metadata": true,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "max_iterations",
                "value": 15,
                "display_name": "Max Iterations",
                "advanced": true,
                "dynamic": false,
                "info": "The maximum number of attempts the agent can make to complete its task before it stops.",
                "title_case": false,
                "type": "int",
                "_input_type": "IntInput"
              },
              "max_tokens": {
                "trace_as_metadata": true,
                "range_spec": {
                  "step_type": "float",
                  "min": 0,
                  "max": 128000,
                  "step": 0.1
                },
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "max_tokens",
                "value": "",
                "display_name": "Max Tokens",
                "advanced": true,
                "dynamic": false,
                "info": "The maximum number of tokens to generate. Set to 0 for unlimited tokens.",
                "title_case": false,
                "type": "int",
                "_input_type": "IntInput"
              },
              "model_kwargs": {
                "trace_as_input": true,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "model_kwargs",
                "value": {},
                "display_name": "Model Kwargs",
                "advanced": true,
                "dynamic": false,
                "info": "Additional keyword arguments to pass to the model.",
                "title_case": false,
                "type": "dict",
                "_input_type": "DictInput"
              },
              "model_name": {
                "tool_mode": false,
                "trace_as_metadata": true,
                "options": [
                  "gpt-4o-mini",
                  "gpt-4o",
                  "gpt-4-turbo",
                  "gpt-4-turbo-preview",
                  "gpt-4",
                  "gpt-3.5-turbo",
                  "gpt-3.5-turbo-0125"
                ],
                "combobox": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "model_name",
                "value": "gpt-4o-mini",
                "display_name": "Model Name",
                "advanced": false,
                "dynamic": false,
                "info": "",
                "title_case": false,
                "type": "str",
                "_input_type": "DropdownInput"
              },
              "n_messages": {
                "trace_as_metadata": true,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "n_messages",
                "value": 100,
                "display_name": "Number of Messages",
                "advanced": true,
                "dynamic": false,
                "info": "Number of messages to retrieve.",
                "title_case": false,
                "type": "int",
                "_input_type": "IntInput"
              },
              "openai_api_base": {
                "trace_as_metadata": true,
                "load_from_db": false,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "openai_api_base",
                "value": "",
                "display_name": "OpenAI API Base",
                "advanced": true,
                "dynamic": false,
                "info": "The base URL of the OpenAI API. Defaults to https://api.openai.com/v1. You can change this to use other APIs like JinaChat, LocalAI and Prem.",
                "title_case": false,
                "type": "str",
                "_input_type": "StrInput"
              },
              "order": {
                "tool_mode": false,
                "trace_as_metadata": true,
                "options": [
                  "Ascending",
                  "Descending"
                ],
                "combobox": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "order",
                "value": "Ascending",
                "display_name": "Order",
                "advanced": true,
                "dynamic": false,
                "info": "Order of the messages.",
                "title_case": false,
                "type": "str",
                "_input_type": "DropdownInput"
              },
              "output_schema": {
                "trace_as_input": true,
                "list": true,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "output_schema",
                "value": {},
                "display_name": "Schema",
                "advanced": true,
                "dynamic": false,
                "info": "The schema for the Output of the model. You must pass the word JSON in the prompt. If left blank, JSON mode will be disabled. [DEPRECATED]",
                "title_case": false,
                "type": "dict",
                "_input_type": "DictInput"
              },
              "seed": {
                "trace_as_metadata": true,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "seed",
                "value": 1,
                "display_name": "Seed",
                "advanced": true,
                "dynamic": false,
                "info": "The seed controls the reproducibility of the job.",
                "title_case": false,
                "type": "int",
                "_input_type": "IntInput"
              },
              "sender": {
                "tool_mode": false,
                "trace_as_metadata": true,
                "options": [
                  "Machine",
                  "User",
                  "Machine and User"
                ],
                "combobox": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "sender",
                "value": "Machine and User",
                "display_name": "Sender Type",
                "advanced": true,
                "dynamic": false,
                "info": "Filter by sender type.",
                "title_case": false,
                "type": "str",
                "_input_type": "DropdownInput"
              },
              "sender_name": {
                "tool_mode": false,
                "trace_as_input": true,
                "trace_as_metadata": true,
                "load_from_db": false,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "sender_name",
                "value": "",
                "display_name": "Sender Name",
                "advanced": true,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "Filter by sender name.",
                "title_case": false,
                "type": "str",
                "_input_type": "MessageTextInput"
              },
              "session_id": {
                "tool_mode": false,
                "trace_as_input": true,
                "trace_as_metadata": true,
                "load_from_db": false,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "session_id",
                "value": "",
                "display_name": "Session ID",
                "advanced": true,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
                "title_case": false,
                "type": "str",
                "_input_type": "MessageTextInput"
              },
              "system_prompt": {
                "tool_mode": false,
                "trace_as_input": true,
                "multiline": true,
                "trace_as_metadata": true,
                "load_from_db": false,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "system_prompt",
                "value": "Você é um assistente que utiliza as tools para interagir com dados de uma planilha via API.\nPode ler, buscar, contar e inserir dados.\n\nRegras:\n\n- Entenda o pedido do usuário.\n\n-  Use a ferramenta certa:\n\nReads all data:ler todos os dados\n\nFetch the Column Names:obter nomes das colunas\n\nFetches the number of data rows: contar linhas\n\nSearch Rows:buscar com filtro\n\nInsert New Row: adicionar nova linha\n\n-  Antes de buscar ou inserir, use Fetch the Column Names para saber os nomes corretos.\n\n-  Se o pedido for muito longo, sugira dividir em partes menores.\n\n-  Ao inserir dados, ajude o usuário a preencher colunas faltantes.\n\n-  Sempre responda de forma clara e direta, com listas ou tabelas, se necessário.",
                "display_name": "Agent Instructions",
                "advanced": false,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "System Prompt: Initial instructions and context provided to guide the agent's behavior.",
                "title_case": false,
                "type": "str",
                "_input_type": "MultilineInput"
              },
              "temperature": {
                "trace_as_metadata": true,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "temperature",
                "value": 0.1,
                "display_name": "Temperature",
                "advanced": true,
                "dynamic": false,
                "info": "",
                "title_case": false,
                "type": "float",
                "_input_type": "FloatInput"
              },
              "template": {
                "tool_mode": false,
                "trace_as_input": true,
                "multiline": true,
                "trace_as_metadata": true,
                "load_from_db": false,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "template",
                "value": "{sender_name}: {text}",
                "display_name": "Template",
                "advanced": true,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "The template to use for formatting the data. It can contain the keys {text}, {sender} or any other key in the message data.",
                "title_case": false,
                "type": "str",
                "_input_type": "MultilineInput"
              },
              "verbose": {
                "trace_as_metadata": true,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "verbose",
                "value": true,
                "display_name": "Verbose",
                "advanced": true,
                "dynamic": false,
                "info": "",
                "title_case": false,
                "type": "bool",
                "_input_type": "BoolInput"
              }
            },
            "description": "Define the agent's instructions, then enter a task to complete using tools.",
            "icon": "bot",
            "base_classes": [
              "Message"
            ],
            "display_name": "Agent",
            "documentation": "",
            "custom_fields": {},
            "output_types": [],
            "pinned": false,
            "conditional_paths": [],
            "frozen": false,
            "outputs": [
              {
                "types": [
                  "Message"
                ],
                "selected": "Message",
                "name": "response",
                "display_name": "Response",
                "method": "message_response",
                "value": "__UNDEFINED__",
                "cache": true
              }
            ],
            "field_order": [
              "agent_llm",
              "max_tokens",
              "model_kwargs",
              "json_mode",
              "output_schema",
              "model_name",
              "openai_api_base",
              "api_key",
              "temperature",
              "seed",
              "output_parser",
              "system_prompt",
              "tools",
              "input_value",
              "handle_parsing_errors",
              "verbose",
              "max_iterations",
              "agent_description",
              "memory",
              "sender",
              "sender_name",
              "n_messages",
              "session_id",
              "order",
              "template",
              "add_current_date_tool"
            ],
            "beta": false,
            "legacy": false,
            "edited": false,
            "metadata": {},
            "tool_mode": false,
            "category": "agents",
            "key": "Agent",
            "score": 5.283996070936036e-7,
            "lf_version": "1.1.1"
          },
          "type": "Agent",
          "id": "Agent-XtQp3"
        },
        "selected": false,
        "width": 320,
        "height": 643,
        "positionAbsolute": {
          "x": 823.4221991899246,
          "y": 80.89232362913731
        },
        "dragging": false
      },
      {
        "id": "ChatInput-yAxS8",
        "type": "genericNode",
        "position": {
          "x": -66.60812772687495,
          "y": -134.6086961552964
        },
        "data": {
          "node": {
            "template": {
              "_type": "Component",
              "files": {
                "trace_as_metadata": true,
                "file_path": "",
                "fileTypes": [
                  "txt",
                  "md",
                  "mdx",
                  "csv",
                  "json",
                  "yaml",
                  "yml",
                  "xml",
                  "html",
                  "htm",
                  "pdf",
                  "docx",
                  "py",
                  "sh",
                  "sql",
                  "js",
                  "ts",
                  "tsx",
                  "jpg",
                  "jpeg",
                  "png",
                  "bmp",
                  "image"
                ],
                "list": true,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "files",
                "value": "",
                "display_name": "Files",
                "advanced": true,
                "dynamic": false,
                "info": "Files to be sent with the message.",
                "title_case": false,
                "type": "file",
                "_input_type": "FileInput"
              },
              "background_color": {
                "tool_mode": false,
                "trace_as_input": true,
                "trace_as_metadata": true,
                "load_from_db": false,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "background_color",
                "value": "",
                "display_name": "Background Color",
                "advanced": true,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "The background color of the icon.",
                "title_case": false,
                "type": "str",
                "_input_type": "MessageTextInput"
              },
              "chat_icon": {
                "tool_mode": false,
                "trace_as_input": true,
                "trace_as_metadata": true,
                "load_from_db": false,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "chat_icon",
                "value": "",
                "display_name": "Icon",
                "advanced": true,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "The icon of the message.",
                "title_case": false,
                "type": "str",
                "_input_type": "MessageTextInput"
              },
              "code": {
                "type": "code",
                "required": true,
                "placeholder": "",
                "list": false,
                "show": true,
                "multiline": true,
                "value": "from langflow.base.data.utils import IMG_FILE_TYPES, TEXT_FILE_TYPES\nfrom langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import DropdownInput, FileInput, MessageTextInput, MultilineInput, Output\nfrom langflow.schema.message import Message\nfrom langflow.utils.constants import MESSAGE_SENDER_AI, MESSAGE_SENDER_NAME_USER, MESSAGE_SENDER_USER\n\n\nclass ChatInput(ChatComponent):\n    display_name = \"Chat Input\"\n    description = \"Get chat inputs from the Playground.\"\n    icon = \"table\"\n    name = \"ChatInput\"\n\n    inputs = [\n        MultilineInput(\n            name=\"input_value\",\n            display_name=\"Text\",\n            value=\"\",\n            info=\"Message to be passed as input.\",\n        ),\n        BoolInput(\n            name=\"should_store_message\",\n            display_name=\"Store Messages\",\n            info=\"Store the message in the history.\",\n            value=True,\n            advanced=True,\n        ),\n        DropdownInput(\n            name=\"sender\",\n            display_name=\"Sender Type\",\n            options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n            value=MESSAGE_SENDER_USER,\n            info=\"Type of sender.\",\n            advanced=True,\n        ),\n        MessageTextInput(\n            name=\"sender_name\",\n            display_name=\"Sender Name\",\n            info=\"Name of the sender.\",\n            value=MESSAGE_SENDER_NAME_USER,\n            advanced=True,\n        ),\n        MessageTextInput(\n            name=\"session_id\",\n            display_name=\"Session ID\",\n            info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n            advanced=True,\n        ),\n        FileInput(\n            name=\"files\",\n            display_name=\"Files\",\n            file_types=TEXT_FILE_TYPES + IMG_FILE_TYPES,\n            info=\"Files to be sent with the message.\",\n            advanced=True,\n            is_list=True,\n        ),\n        MessageTextInput(\n            name=\"background_color\",\n            display_name=\"Background Color\",\n            info=\"The background color of the icon.\",\n            advanced=True,\n        ),\n        MessageTextInput(\n            name=\"chat_icon\",\n            display_name=\"Icon\",\n            info=\"The icon of the message.\",\n            advanced=True,\n        ),\n        MessageTextInput(\n            name=\"text_color\",\n            display_name=\"Text Color\",\n            info=\"The text color of the name\",\n            advanced=True,\n        ),\n    ]\n    outputs = [\n        Output(display_name=\"Message\", name=\"message\", method=\"message_response\"),\n    ]\n\n    def message_response(self) -> Message:\n        _background_color = self.background_color\n        _text_color = self.text_color\n        _icon = self.chat_icon\n        message = Message(\n            text=self.input_value,\n            sender=self.sender,\n            sender_name=self.sender_name,\n            session_id=self.session_id,\n            files=self.files,\n            properties={\"background_color\": _background_color, \"text_color\": _text_color, \"icon\": _icon},\n        )\n        if self.session_id and isinstance(message, Message) and self.should_store_message:\n            stored_message = self.send_message(\n                message,\n            )\n            self.message.value = stored_message\n            message = stored_message\n\n        self.status = message\n        return message\n",
                "fileTypes": [],
                "file_path": "",
                "password": false,
                "name": "code",
                "advanced": true,
                "dynamic": true,
                "info": "",
                "load_from_db": false,
                "title_case": false
              },
              "input_value": {
                "tool_mode": false,
                "trace_as_input": true,
                "multiline": true,
                "trace_as_metadata": true,
                "load_from_db": false,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "input_value",
                "value": "",
                "display_name": "Text",
                "advanced": false,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "Message to be passed as input.",
                "title_case": false,
                "type": "str",
                "_input_type": "MultilineInput"
              },
              "sender": {
                "tool_mode": false,
                "trace_as_metadata": true,
                "options": [
                  "Machine",
                  "User"
                ],
                "combobox": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "sender",
                "value": "User",
                "display_name": "Sender Type",
                "advanced": true,
                "dynamic": false,
                "info": "Type of sender.",
                "title_case": false,
                "type": "str",
                "_input_type": "DropdownInput"
              },
              "sender_name": {
                "tool_mode": false,
                "trace_as_input": true,
                "trace_as_metadata": true,
                "load_from_db": false,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "sender_name",
                "value": "User",
                "display_name": "Sender Name",
                "advanced": true,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "Name of the sender.",
                "title_case": false,
                "type": "str",
                "_input_type": "MessageTextInput"
              },
              "session_id": {
                "tool_mode": false,
                "trace_as_input": true,
                "trace_as_metadata": true,
                "load_from_db": false,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "session_id",
                "value": "",
                "display_name": "Session ID",
                "advanced": true,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
                "title_case": false,
                "type": "str",
                "_input_type": "MessageTextInput"
              },
              "should_store_message": {
                "trace_as_metadata": true,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "should_store_message",
                "value": true,
                "display_name": "Store Messages",
                "advanced": true,
                "dynamic": false,
                "info": "Store the message in the history.",
                "title_case": false,
                "type": "bool",
                "_input_type": "BoolInput"
              },
              "text_color": {
                "tool_mode": false,
                "trace_as_input": true,
                "trace_as_metadata": true,
                "load_from_db": false,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "text_color",
                "value": "",
                "display_name": "Text Color",
                "advanced": true,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "The text color of the name",
                "title_case": false,
                "type": "str",
                "_input_type": "MessageTextInput"
              }
            },
            "description": "Get chat inputs from the Playground.",
            "icon": "table",
            "base_classes": [
              "Message"
            ],
            "display_name": "Chat Input",
            "documentation": "",
            "custom_fields": {},
            "output_types": [],
            "pinned": false,
            "conditional_paths": [],
            "frozen": false,
            "outputs": [
              {
                "types": [
                  "Message"
                ],
                "selected": "Message",
                "name": "message",
                "display_name": "Message",
                "method": "message_response",
                "value": "__UNDEFINED__",
                "cache": true
              }
            ],
            "field_order": [
              "input_value",
              "should_store_message",
              "sender",
              "sender_name",
              "session_id",
              "files",
              "background_color",
              "chat_icon",
              "text_color"
            ],
            "beta": false,
            "legacy": false,
            "edited": true,
            "metadata": {},
            "tool_mode": false
          },
          "type": "ChatInput",
          "id": "ChatInput-yAxS8"
        },
        "selected": false,
        "width": 320,
        "height": 232,
        "positionAbsolute": {
          "x": -66.60812772687495,
          "y": -134.6086961552964
        },
        "dragging": false
      },
      {
        "id": "ChatOutput-nfWQn",
        "type": "genericNode",
        "position": {
          "x": 1280.5795643095823,
          "y": 448.0929121965131
        },
        "data": {
          "node": {
            "template": {
              "_type": "Component",
              "background_color": {
                "tool_mode": false,
                "trace_as_input": true,
                "trace_as_metadata": true,
                "load_from_db": false,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "background_color",
                "value": "",
                "display_name": "Background Color",
                "advanced": true,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "The background color of the icon.",
                "title_case": false,
                "type": "str",
                "_input_type": "MessageTextInput"
              },
              "chat_icon": {
                "tool_mode": false,
                "trace_as_input": true,
                "trace_as_metadata": true,
                "load_from_db": false,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "chat_icon",
                "value": "",
                "display_name": "Icon",
                "advanced": true,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "The icon of the message.",
                "title_case": false,
                "type": "str",
                "_input_type": "MessageTextInput"
              },
              "code": {
                "type": "code",
                "required": true,
                "placeholder": "",
                "list": false,
                "show": true,
                "multiline": true,
                "value": "from langflow.base.io.chat import ChatComponent\nfrom langflow.inputs import BoolInput\nfrom langflow.io import DropdownInput, MessageInput, MessageTextInput, Output\nfrom langflow.schema.message import Message\nfrom langflow.schema.properties import Source\nfrom langflow.utils.constants import MESSAGE_SENDER_AI, MESSAGE_SENDER_NAME_AI, MESSAGE_SENDER_USER\n\n\nclass ChatOutput(ChatComponent):\n    display_name = \"Chat Output\"\n    description = \"Display a chat message in the Playground.\"\n    icon = \"MessagesSquare\"\n    name = \"ChatOutput\"\n\n    inputs = [\n        MessageInput(\n            name=\"input_value\",\n            display_name=\"Text\",\n            info=\"Message to be passed as output.\",\n        ),\n        BoolInput(\n            name=\"should_store_message\",\n            display_name=\"Store Messages\",\n            info=\"Store the message in the history.\",\n            value=True,\n            advanced=True,\n        ),\n        DropdownInput(\n            name=\"sender\",\n            display_name=\"Sender Type\",\n            options=[MESSAGE_SENDER_AI, MESSAGE_SENDER_USER],\n            value=MESSAGE_SENDER_AI,\n            advanced=True,\n            info=\"Type of sender.\",\n        ),\n        MessageTextInput(\n            name=\"sender_name\",\n            display_name=\"Sender Name\",\n            info=\"Name of the sender.\",\n            value=MESSAGE_SENDER_NAME_AI,\n            advanced=True,\n        ),\n        MessageTextInput(\n            name=\"session_id\",\n            display_name=\"Session ID\",\n            info=\"The session ID of the chat. If empty, the current session ID parameter will be used.\",\n            advanced=True,\n        ),\n        MessageTextInput(\n            name=\"data_template\",\n            display_name=\"Data Template\",\n            value=\"{text}\",\n            advanced=True,\n            info=\"Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.\",\n        ),\n        MessageTextInput(\n            name=\"background_color\",\n            display_name=\"Background Color\",\n            info=\"The background color of the icon.\",\n            advanced=True,\n        ),\n        MessageTextInput(\n            name=\"chat_icon\",\n            display_name=\"Icon\",\n            info=\"The icon of the message.\",\n            advanced=True,\n        ),\n        MessageTextInput(\n            name=\"text_color\",\n            display_name=\"Text Color\",\n            info=\"The text color of the name\",\n            advanced=True,\n        ),\n    ]\n    outputs = [\n        Output(\n            display_name=\"Message\",\n            name=\"message\",\n            method=\"message_response\",\n        ),\n    ]\n\n    def _build_source(self, _id: str | None, display_name: str | None, source: str | None) -> Source:\n        source_dict = {}\n        if _id:\n            source_dict[\"id\"] = _id\n        if display_name:\n            source_dict[\"display_name\"] = display_name\n        if source:\n            source_dict[\"source\"] = source\n        return Source(**source_dict)\n\n    def message_response(self) -> Message:\n        _source, _icon, _display_name, _source_id = self.get_properties_from_source_component()\n        _background_color = self.background_color\n        _text_color = self.text_color\n        if self.chat_icon:\n            _icon = self.chat_icon\n        message = self.input_value if isinstance(self.input_value, Message) else Message(text=self.input_value)\n        message.sender = self.sender\n        message.sender_name = self.sender_name\n        message.session_id = self.session_id\n        message.flow_id = self.graph.flow_id if hasattr(self, \"graph\") else None\n        message.properties.source = self._build_source(_source_id, _display_name, _source)\n        message.properties.icon = _icon\n        message.properties.background_color = _background_color\n        message.properties.text_color = _text_color\n        if self.session_id and isinstance(message, Message) and self.should_store_message:\n            stored_message = self.send_message(\n                message,\n            )\n            self.message.value = stored_message\n            message = stored_message\n\n        self.status = message\n        return message\n",
                "fileTypes": [],
                "file_path": "",
                "password": false,
                "name": "code",
                "advanced": true,
                "dynamic": true,
                "info": "",
                "load_from_db": false,
                "title_case": false
              },
              "data_template": {
                "tool_mode": false,
                "trace_as_input": true,
                "trace_as_metadata": true,
                "load_from_db": false,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "data_template",
                "value": "{text}",
                "display_name": "Data Template",
                "advanced": true,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "Template to convert Data to Text. If left empty, it will be dynamically set to the Data's text key.",
                "title_case": false,
                "type": "str",
                "_input_type": "MessageTextInput"
              },
              "input_value": {
                "trace_as_input": true,
                "trace_as_metadata": true,
                "load_from_db": false,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "input_value",
                "value": "",
                "display_name": "Text",
                "advanced": false,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "Message to be passed as output.",
                "title_case": false,
                "type": "str",
                "_input_type": "MessageInput"
              },
              "sender": {
                "tool_mode": false,
                "trace_as_metadata": true,
                "options": [
                  "Machine",
                  "User"
                ],
                "combobox": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "sender",
                "value": "Machine",
                "display_name": "Sender Type",
                "advanced": true,
                "dynamic": false,
                "info": "Type of sender.",
                "title_case": false,
                "type": "str",
                "_input_type": "DropdownInput"
              },
              "sender_name": {
                "tool_mode": false,
                "trace_as_input": true,
                "trace_as_metadata": true,
                "load_from_db": false,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "sender_name",
                "value": "AI",
                "display_name": "Sender Name",
                "advanced": true,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "Name of the sender.",
                "title_case": false,
                "type": "str",
                "_input_type": "MessageTextInput"
              },
              "session_id": {
                "tool_mode": false,
                "trace_as_input": true,
                "trace_as_metadata": true,
                "load_from_db": false,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "session_id",
                "value": "",
                "display_name": "Session ID",
                "advanced": true,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "The session ID of the chat. If empty, the current session ID parameter will be used.",
                "title_case": false,
                "type": "str",
                "_input_type": "MessageTextInput"
              },
              "should_store_message": {
                "trace_as_metadata": true,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "should_store_message",
                "value": true,
                "display_name": "Store Messages",
                "advanced": true,
                "dynamic": false,
                "info": "Store the message in the history.",
                "title_case": false,
                "type": "bool",
                "_input_type": "BoolInput"
              },
              "text_color": {
                "tool_mode": false,
                "trace_as_input": true,
                "trace_as_metadata": true,
                "load_from_db": false,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "text_color",
                "value": "",
                "display_name": "Text Color",
                "advanced": true,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "The text color of the name",
                "title_case": false,
                "type": "str",
                "_input_type": "MessageTextInput"
              }
            },
            "description": "Display a chat message in the Playground.",
            "icon": "MessagesSquare",
            "base_classes": [
              "Message"
            ],
            "display_name": "Chat Output",
            "documentation": "",
            "custom_fields": {},
            "output_types": [],
            "pinned": false,
            "conditional_paths": [],
            "frozen": false,
            "outputs": [
              {
                "types": [
                  "Message"
                ],
                "selected": "Message",
                "name": "message",
                "display_name": "Message",
                "method": "message_response",
                "value": "__UNDEFINED__",
                "cache": true
              }
            ],
            "field_order": [
              "input_value",
              "should_store_message",
              "sender",
              "sender_name",
              "session_id",
              "data_template",
              "background_color",
              "chat_icon",
              "text_color"
            ],
            "beta": false,
            "legacy": false,
            "edited": false,
            "metadata": {},
            "tool_mode": false,
            "category": "outputs",
            "key": "ChatOutput",
            "score": 0.00012027401062119145,
            "lf_version": "1.1.1"
          },
          "type": "ChatOutput",
          "id": "ChatOutput-nfWQn"
        },
        "selected": false,
        "width": 320,
        "height": 232,
        "positionAbsolute": {
          "x": 1280.5795643095823,
          "y": 448.0929121965131
        },
        "dragging": false
      },
      {
        "id": "CustomComponent-fTDig",
        "type": "genericNode",
        "position": {
          "x": -63.369001666858026,
          "y": 308.87286497089485
        },
        "data": {
          "node": {
            "template": {
              "_type": "Component",
              "api_id": {
                "load_from_db": false,
                "required": true,
                "placeholder": "",
                "show": true,
                "name": "api_id",
                "value": "",
                "display_name": "API ID",
                "advanced": false,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "Your SheetDB API ID (e.g., 58f61be4dda40).",
                "title_case": false,
                "password": true,
                "type": "str",
                "_input_type": "SecretStrInput"
              },
              "code": {
                "type": "code",
                "required": true,
                "placeholder": "",
                "list": false,
                "show": true,
                "multiline": true,
                "value": "import requests\r\nfrom typing import List\r\nfrom pydantic import BaseModel\r\nfrom langchain.tools import StructuredTool\r\nfrom langflow.base.langchain_utilities.model import LCToolComponent\r\nfrom langflow.field_typing import Data, Tool\r\nfrom langflow.inputs import SecretStrInput\r\n\r\n\r\nclass SheetDBKeysToolComponent(LCToolComponent):\r\n    display_name = \"Sheet DB Keys\"\r\n    description = \"Fetches the column names (keys) from the first row of a SheetDB spreadsheet.\"\r\n    documentation = \"https://sheetdb.io/documentation\"\r\n    icon = \"table\"\r\n    name = \"SheetDBKeys\"\r\n\r\n    inputs = [\r\n        SecretStrInput(\r\n            name=\"api_id\",\r\n            display_name=\"API ID\",\r\n            info=\"Your SheetDB API ID (e.g., 58f61be4dda40).\",\r\n            required=True,\r\n        ),\r\n    ]\r\n\r\n    class SheetDBKeysSchema(BaseModel):\r\n        # Nenhum parâmetro no schema porque o api_id é usado apenas no nível da instância\r\n        pass\r\n\r\n    def _fetch_keys(self) -> List[Data]:\r\n        url = f\"https://sheetdb.io/api/v1/{self.api_id}/keys\"\r\n\r\n        try:\r\n            response = requests.get(url)\r\n            response.raise_for_status()\r\n            keys = response.json()\r\n\r\n            if isinstance(keys, list):\r\n                return [Data(data={\"columns\": keys})]\r\n            else:\r\n                return [Data(data={\"error\": \"Unexpected response format\", \"raw\": keys})]\r\n\r\n        except Exception as e:\r\n            return [Data(data={\"error\": str(e)})]\r\n\r\n    def build_tool(self) -> Tool:\r\n        return StructuredTool.from_function(\r\n            name=\"fetch_sheetdb_keys\",\r\n            description=\"Get the column names from a SheetDB spreadsheet (first row headers).\",\r\n            func=self._fetch_keys,\r\n            args_schema=self.SheetDBKeysSchema,\r\n        )\r\n\r\n    def run_model(self) -> List[Data]:\r\n        return self._fetch_keys()\r\n",
                "fileTypes": [],
                "file_path": "",
                "password": false,
                "name": "code",
                "advanced": true,
                "dynamic": true,
                "info": "",
                "load_from_db": false,
                "title_case": false
              }
            },
            "description": "Fetches the column names (keys) from the first row of a SheetDB spreadsheet.",
            "icon": "table",
            "base_classes": [
              "Data",
              "Tool"
            ],
            "display_name": "Fetchs the Colum Names - SheetDB",
            "documentation": "https://sheetdb.io/documentation",
            "custom_fields": {},
            "output_types": [],
            "pinned": false,
            "conditional_paths": [],
            "frozen": false,
            "outputs": [
              {
                "types": [
                  "Data"
                ],
                "selected": "Data",
                "name": "api_run_model",
                "display_name": "Data",
                "method": "run_model",
                "value": "__UNDEFINED__",
                "cache": true,
                "required_inputs": [
                  "api_id"
                ]
              },
              {
                "types": [
                  "Tool"
                ],
                "selected": "Tool",
                "name": "api_build_tool",
                "display_name": "Tool",
                "method": "build_tool",
                "value": "__UNDEFINED__",
                "cache": true,
                "required_inputs": [
                  "api_id"
                ]
              }
            ],
            "field_order": [
              "api_id"
            ],
            "beta": false,
            "legacy": false,
            "edited": true,
            "metadata": {},
            "tool_mode": false
          },
          "type": "CustomComponent",
          "id": "CustomComponent-fTDig"
        },
        "selected": false,
        "width": 320,
        "height": 300,
        "positionAbsolute": {
          "x": -63.369001666858026,
          "y": 308.87286497089485
        },
        "dragging": false
      },
      {
        "id": "CustomComponent-LXya1",
        "type": "genericNode",
        "position": {
          "x": -596.2868568952289,
          "y": 1115.5923638986396
        },
        "data": {
          "node": {
            "template": {
              "_type": "Component",
              "api_id": {
                "load_from_db": false,
                "required": true,
                "placeholder": "",
                "show": true,
                "name": "api_id",
                "value": "",
                "display_name": "API ID",
                "advanced": false,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "Your SheetDB API ID (e.g., 58f61be4dda40).",
                "title_case": false,
                "password": true,
                "type": "str",
                "_input_type": "SecretStrInput"
              },
              "code": {
                "type": "code",
                "required": true,
                "placeholder": "",
                "list": false,
                "show": true,
                "multiline": true,
                "value": "import requests\r\nfrom typing import List\r\nfrom pydantic import BaseModel\r\nfrom langchain.tools import StructuredTool\r\nfrom langflow.base.langchain_utilities.model import LCToolComponent\r\nfrom langflow.field_typing import Data, Tool\r\nfrom langflow.inputs import SecretStrInput\r\n\r\n\r\nclass SheetDBCountToolComponent(LCToolComponent):\r\n    display_name = \"Sheet DB Row Count\"\r\n    description = \"Fetches the number of data rows (excluding the header) from a SheetDB spreadsheet.\"\r\n    documentation = \"https://sheetdb.io/documentation\"\r\n    icon = \"table\"\r\n    name = \"SheetDBRowCount\"\r\n\r\n    inputs = [\r\n        SecretStrInput(\r\n            name=\"api_id\",\r\n            display_name=\"API ID\",\r\n            info=\"Your SheetDB API ID (e.g., 58f61be4dda40).\",\r\n            required=True,\r\n        ),\r\n    ]\r\n\r\n    class SheetDBCountSchema(BaseModel):\r\n        # Nenhum parâmetro no schema porque o api_id é usado apenas no nível da instância\r\n        pass\r\n\r\n    def _fetch_row_count(self) -> List[Data]:\r\n        url = f\"https://sheetdb.io/api/v1/{self.api_id}/count\"\r\n\r\n        try:\r\n            response = requests.get(url)\r\n            response.raise_for_status()\r\n            data = response.json()\r\n\r\n            if isinstance(data, dict) and \"rows\" in data:\r\n                return [Data(data={\"status\": \"success\", \"rows\": data[\"rows\"]})]\r\n            else:\r\n                return [Data(data={\"status\": \"error\", \"message\": \"Unexpected response format\", \"raw\": data})]\r\n\r\n        except Exception as e:\r\n            return [Data(data={\"status\": \"error\", \"message\": str(e)})]\r\n\r\n    def build_tool(self) -> Tool:\r\n        return StructuredTool.from_function(\r\n            name=\"fetch_sheetdb_row_count\",\r\n            description=\"Returns the number of rows in a SheetDB spreadsheet (excluding the header).\",\r\n            func=self._fetch_row_count,\r\n            args_schema=self.SheetDBCountSchema,\r\n        )\r\n\r\n    def run_model(self) -> List[Data]:\r\n        return self._fetch_row_count()\r\n",
                "fileTypes": [],
                "file_path": "",
                "password": false,
                "name": "code",
                "advanced": true,
                "dynamic": true,
                "info": "",
                "load_from_db": false,
                "title_case": false
              }
            },
            "description": "Fetches the number of data rows (excluding the header) from a SheetDB spreadsheet.",
            "icon": "table",
            "base_classes": [
              "Data",
              "Tool"
            ],
            "display_name": "Fetches the number of data rows - SheetDB",
            "documentation": "https://sheetdb.io/documentation",
            "custom_fields": {},
            "output_types": [],
            "pinned": false,
            "conditional_paths": [],
            "frozen": false,
            "outputs": [
              {
                "types": [
                  "Data"
                ],
                "selected": "Data",
                "name": "api_run_model",
                "display_name": "Data",
                "method": "run_model",
                "value": "__UNDEFINED__",
                "cache": true,
                "required_inputs": [
                  "api_id"
                ]
              },
              {
                "types": [
                  "Tool"
                ],
                "selected": "Tool",
                "name": "api_build_tool",
                "display_name": "Tool",
                "method": "build_tool",
                "value": "__UNDEFINED__",
                "cache": true,
                "required_inputs": [
                  "api_id"
                ]
              }
            ],
            "field_order": [
              "api_id"
            ],
            "beta": false,
            "legacy": false,
            "edited": true,
            "metadata": {},
            "tool_mode": false
          },
          "type": "CustomComponent",
          "id": "CustomComponent-LXya1"
        },
        "selected": false,
        "width": 320,
        "height": 300,
        "positionAbsolute": {
          "x": -596.2868568952289,
          "y": 1115.5923638986396
        },
        "dragging": false
      },
      {
        "id": "CustomComponent-AAPMp",
        "type": "genericNode",
        "position": {
          "x": -36.90680092851096,
          "y": 640.750873765787
        },
        "data": {
          "node": {
            "template": {
              "_type": "Component",
              "api_id": {
                "load_from_db": false,
                "required": true,
                "placeholder": "",
                "show": true,
                "name": "api_id",
                "value": "",
                "display_name": "API ID",
                "advanced": false,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "The unique SheetDB API ID.",
                "title_case": false,
                "password": true,
                "type": "str",
                "_input_type": "SecretStrInput"
              },
              "code": {
                "type": "code",
                "required": true,
                "placeholder": "",
                "list": false,
                "show": true,
                "multiline": true,
                "value": "import requests\r\nfrom typing import Dict, Any, List, Optional\r\nfrom pydantic import BaseModel, Field\r\nfrom langchain.tools import StructuredTool\r\nfrom langflow.base.langchain_utilities.model import LCToolComponent\r\nfrom langflow.field_typing import Data, Tool\r\nfrom langflow.inputs import SecretStrInput, NestedDictInput\r\nfrom loguru import logger\r\n\r\n\r\nclass SheetDBSearchToolComponent(LCToolComponent):\r\n    display_name = \"SheetDB Search Tool\"\r\n    description = \"Search rows in a SheetDB spreadsheet based on query conditions.\"\r\n    documentation = \"https://sheetdb.io/api#search\"\r\n    icon = \"table\"\r\n    name = \"SheetDBSearch\"\r\n\r\n    inputs = [\r\n        SecretStrInput(\r\n            name=\"api_id\",\r\n            display_name=\"API ID\",\r\n            info=\"The unique SheetDB API ID.\",\r\n            required=True,\r\n        ),\r\n        NestedDictInput(\r\n            name=\"query\",\r\n            display_name=\"Query Conditions\",\r\n            info=\"Dictionary of conditions. Example: {'Cliente': 'Equatorial'} or {'id[]': '>1', 'id[]': '<5'}\",\r\n            input_types=[\"Data\"],\r\n            required=False,\r\n        ),\r\n    ]\r\n\r\n    class SheetDBSearchSchema(BaseModel):\r\n        query: Optional[Dict[str, Any]] = Field(\r\n            default_factory=dict,\r\n            description=\"Dictionary of search conditions. Example: {'Cliente': 'Equatorial'}\"\r\n        )\r\n\r\n    def _search_sheetdb(self, query: Optional[Dict[str, Any]] = None) -> List[Data]:\r\n        if not query:\r\n            return [Data(data={\"status\": \"error\", \"message\": \"Missing query parameters. Provide a query like {'Cliente': 'Equatorial'}.\"})]\r\n\r\n        url = f\"https://sheetdb.io/api/v1/{self.api_id}/search\"\r\n        params = {**query}\r\n\r\n        try:\r\n            response = requests.get(url, params=params)\r\n            response.raise_for_status()\r\n            results = response.json()\r\n\r\n            return [Data(data=result) for result in results]\r\n\r\n        except requests.RequestException as e:\r\n            logger.error(f\"SheetDB search failed: {str(e)}\")\r\n            return [Data(data={\"status\": \"error\", \"message\": str(e)})]\r\n\r\n    def build_tool(self) -> Tool:\r\n        return StructuredTool.from_function(\r\n            name=\"sheetdb_search\",\r\n            description=(\r\n                \"Search SheetDB rows by passing a dictionary in 'query', where keys are column names and values are filter values. \"\r\n                \"Supports operators like >, <, !, and wildcards (*). Example: query={'Cliente': 'Equatorial'} or {'id[]': '>1', 'id[]': '<5'}.\"\r\n            ),\r\n            func=self._search_sheetdb,\r\n            args_schema=self.SheetDBSearchSchema,\r\n        )\r\n\r\n    def run_model(self) -> List[Data]:\r\n        return self._search_sheetdb(query=self.query)\r\n",
                "fileTypes": [],
                "file_path": "",
                "password": false,
                "name": "code",
                "advanced": true,
                "dynamic": true,
                "info": "",
                "load_from_db": false,
                "title_case": false
              },
              "query": {
                "trace_as_input": true,
                "trace_as_metadata": true,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "query",
                "value": {},
                "display_name": "Query Conditions",
                "advanced": false,
                "input_types": [
                  "Data"
                ],
                "dynamic": false,
                "info": "Dictionary of conditions. Example: {'Cliente': 'Equatorial'} or {'id[]': '>1', 'id[]': '<5'}",
                "title_case": false,
                "type": "NestedDict",
                "_input_type": "NestedDictInput"
              }
            },
            "description": "Search rows in a SheetDB spreadsheet based on query conditions.",
            "icon": "table",
            "base_classes": [
              "Data",
              "Tool"
            ],
            "display_name": "Search Rows - SheetDB",
            "documentation": "https://sheetdb.io/api#search",
            "custom_fields": {},
            "output_types": [],
            "pinned": false,
            "conditional_paths": [],
            "frozen": false,
            "outputs": [
              {
                "types": [
                  "Data"
                ],
                "selected": "Data",
                "name": "api_run_model",
                "display_name": "Data",
                "method": "run_model",
                "value": "__UNDEFINED__",
                "cache": true,
                "required_inputs": [
                  "api_id"
                ]
              },
              {
                "types": [
                  "Tool"
                ],
                "selected": "Tool",
                "name": "api_build_tool",
                "display_name": "Tool",
                "method": "build_tool",
                "value": "__UNDEFINED__",
                "cache": true,
                "required_inputs": [
                  "api_id"
                ]
              }
            ],
            "field_order": [
              "api_id",
              "query"
            ],
            "beta": false,
            "legacy": false,
            "edited": true,
            "metadata": {},
            "tool_mode": false
          },
          "type": "CustomComponent",
          "id": "CustomComponent-AAPMp"
        },
        "selected": false,
        "width": 320,
        "height": 384,
        "positionAbsolute": {
          "x": -36.90680092851096,
          "y": 640.750873765787
        },
        "dragging": false
      },
      {
        "id": "CustomComponent-qUhcc",
        "type": "genericNode",
        "position": {
          "x": -89.14778908915298,
          "y": 1139.0215971342059
        },
        "data": {
          "node": {
            "template": {
              "_type": "Component",
              "api_id": {
                "load_from_db": false,
                "required": true,
                "placeholder": "",
                "show": true,
                "name": "api_id",
                "value": "",
                "display_name": "SheetDB API ID",
                "advanced": false,
                "input_types": [
                  "Message"
                ],
                "dynamic": false,
                "info": "The SheetDB API ID (found in your SheetDB endpoint URL).",
                "title_case": false,
                "password": true,
                "type": "str",
                "_input_type": "SecretStrInput"
              },
              "code": {
                "type": "code",
                "required": true,
                "placeholder": "",
                "list": false,
                "show": true,
                "multiline": true,
                "value": "import requests\r\nfrom typing import List, Dict, Any, Union\r\nfrom pydantic import BaseModel, Field\r\nfrom langchain.tools import StructuredTool\r\nfrom langflow.base.langchain_utilities.model import LCToolComponent\r\nfrom langflow.field_typing import Data, Tool\r\nfrom langflow.inputs import NestedDictInput, SecretStrInput\r\nfrom loguru import logger\r\n\r\n\r\nclass SheetDBCreateToolComponent(LCToolComponent):\r\n    display_name = \"SheetDB Create Tool\"\r\n    description = (\r\n        \"Adds one or more rows to a SheetDB spreadsheet.\\n\\n\"\r\n        \"You must provide a row (or a list of rows) with keys matching the spreadsheet columns.\\n\"\r\n        \"Use 'INCREMENT' for auto-incrementing numeric IDs, 'DATETIME' or 'TIMESTAMP' to use current date/time.\\n\\n\"\r\n        \"⚠️ If the user passes partial data (e.g., only 3 out of 5 columns), the assistant should ask for the remaining fields.\"\r\n    )\r\n    documentation = \"https://sheetdb.io/api#post\"\r\n    icon = \"table\"\r\n    name = \"SheetDBCreateTool\"\r\n\r\n    inputs = [\r\n        SecretStrInput(\r\n            name=\"api_id\",\r\n            display_name=\"SheetDB API ID\",\r\n            info=\"The SheetDB API ID (found in your SheetDB endpoint URL).\",\r\n            required=True,\r\n        ),\r\n        NestedDictInput(\r\n            name=\"data_rows\",\r\n            display_name=\"Row Data\",\r\n            info=\"Provide a single row as a dict or multiple rows as a list of dicts. \"\r\n                 \"Keys must match your spreadsheet columns.\",\r\n            input_types=[\"Data\"],\r\n        ),\r\n    ]\r\n\r\n    class SheetDBCreateSchema(BaseModel):\r\n        data_rows: Union[List[Dict[str, Any]], Dict[str, Any]] = Field(\r\n            ..., description=(\r\n                \"A single row (as dict) or multiple rows (as list of dicts). \"\r\n                \"Use 'INCREMENT' for ID, 'DATETIME' or 'TIMESTAMP' for date/time. \"\r\n                \"Example: [{'id': 'INCREMENT', 'name': 'Maria', 'age': 28}]\"\r\n            )\r\n        )\r\n\r\n    def _create_rows(self, data_rows: Union[List[Dict[str, Any]], Dict[str, Any]]) -> List[Data]:\r\n        url = f\"https://sheetdb.io/api/v1/{self.api_id}\"\r\n        headers = {\"Content-Type\": \"application/json\"}\r\n\r\n        if isinstance(data_rows, dict):\r\n            data_rows = [data_rows]\r\n\r\n        payload = {\"data\": data_rows}\r\n\r\n        try:\r\n            response = requests.post(url, json=payload, headers=headers)\r\n            response.raise_for_status()\r\n            return [Data(data={\"status\": \"success\", \"created\": response.json().get(\"created\", 0)})]\r\n        except requests.RequestException as e:\r\n            logger.error(f\"SheetDB row creation failed: {str(e)}\")\r\n            return [Data(data={\"status\": \"error\", \"message\": str(e)})]\r\n\r\n    def build_tool(self) -> Tool:\r\n        return StructuredTool.from_function(\r\n            name=\"sheetdb_create_rows\",\r\n            description=\"Create rows in SheetDB using a single row dict or a list of rows.\",\r\n            func=self._create_rows,\r\n            args_schema=self.SheetDBCreateSchema,\r\n        )\r\n\r\n    def run_model(self) -> List[Data]:\r\n        return self._create_rows(data_rows=self.data_rows)\r\n",
                "fileTypes": [],
                "file_path": "",
                "password": false,
                "name": "code",
                "advanced": true,
                "dynamic": true,
                "info": "",
                "load_from_db": false,
                "title_case": false
              },
              "data_rows": {
                "trace_as_input": true,
                "trace_as_metadata": true,
                "list": false,
                "required": false,
                "placeholder": "",
                "show": true,
                "name": "data_rows",
                "value": {},
                "display_name": "Row Data",
                "advanced": false,
                "input_types": [
                  "Data"
                ],
                "dynamic": false,
                "info": "Provide a single row as a dict or multiple rows as a list of dicts. Keys must match your spreadsheet columns.",
                "title_case": false,
                "type": "NestedDict",
                "_input_type": "NestedDictInput"
              }
            },
            "description": "Adds one or more rows to a SheetDB spreadsheet.\n\nYou must provide a row (or a list of rows) with keys matching the spreadsheet columns.\nUse 'INCREMENT' for auto-incrementing numeric IDs, 'DATETIME' or 'TIMESTAMP' to use current date/time.\n\n⚠️ If the user passes partial data (e.g., only 3 out of 5 columns), the assistant should ask for the remaining fields.",
            "icon": "table",
            "base_classes": [
              "Data",
              "Tool"
            ],
            "display_name": "Insert New Row - SheetDB",
            "documentation": "https://sheetdb.io/api#post",
            "custom_fields": {},
            "output_types": [],
            "pinned": false,
            "conditional_paths": [],
            "frozen": false,
            "outputs": [
              {
                "types": [
                  "Data"
                ],
                "selected": "Data",
                "name": "api_run_model",
                "display_name": "Data",
                "method": "run_model",
                "value": "__UNDEFINED__",
                "cache": true,
                "required_inputs": [
                  "api_id"
                ]
              },
              {
                "types": [
                  "Tool"
                ],
                "selected": "Tool",
                "name": "api_build_tool",
                "display_name": "Tool",
                "method": "build_tool",
                "value": "__UNDEFINED__",
                "cache": true,
                "required_inputs": [
                  "api_id"
                ]
              }
            ],
            "field_order": [
              "api_id",
              "data_rows"
            ],
            "beta": false,
            "legacy": false,
            "edited": true,
            "metadata": {},
            "tool_mode": false
          },
          "type": "CustomComponent",
          "id": "CustomComponent-qUhcc"
        },
        "selected": false,
        "width": 320,
        "height": 609,
        "positionAbsolute": {
          "x": -89.14778908915298,
          "y": 1139.0215971342059
        },
        "dragging": false
      },
      {
        "id": "note-3eHEE",
        "type": "noteNode",
        "position": {
          "x": -1509.499784437431,
          "y": 506.0519601933015
        },
        "data": {
          "node": {
            "description": "Este agente é um assistente inteligente desenvolvido para interagir com planilhas do Google Sheets usando a API da SheetDB. Ele é capaz de consultar, ler, inserir e analisar dados de forma automatizada a partir de comandos fornecidos pelo usuário em linguagem natural\n\n## Componentes utilizados\nChat Input: Componente onde o usuário digita sua solicitação (prompt).\n\n**Agent:** Agente baseado no modelo OpenAI gpt-4-0613, configurado para interpretar comandos e acionar ferramentas conectadas.\n\n**Chat Output:** Exibe a resposta do agente para o usuário.\n\n**Fetch the Column Names:** Recupera os nomes das colunas de uma planilha específica.\n\n**Read the data:** Lê os dados de uma planilha Google Sheets via SheetDB API, com suporte para paginação, ordenação e filtros.\n\n**Search Rows:** Realiza buscas condicionais (queries) dentro da planilha.\n\n**Insert New Row:** Insere uma nova linha na planilha com base nos dados fornecidos.\n\nFetch the number of rows: Recupera a quantidade de linhas presentes na planilha, excluindo o cabeçalho.\n\n## 🛠️ Como funciona?\nO usuário envia uma solicitação no Chat Input.\n\nO Agent interpreta o pedido, decide qual ferramenta utilizar (leitura, busca, escrita, etc.).\n\nA ferramenta realiza a operação desejada no Google Sheets.\n\nO resultado é exibido no Chat Output como resposta ao usuário.",
            "display_name": "",
            "documentation": "",
            "template": {}
          },
          "type": "note",
          "id": "note-3eHEE"
        },
        "width": 600,
        "height": 800,
        "selected": false,
        "positionAbsolute": {
          "x": -1509.499784437431,
          "y": 506.0519601933015
        },
        "dragging": false,
        "style": {
          "width": 600,
          "height": 800
        },
        "resizing": false
      }
    ],
    "edges": [
      {
        "source": "ChatInput-yAxS8",
        "sourceHandle": "{œdataTypeœ:œChatInputœ,œidœ:œChatInput-yAxS8œ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}",
        "target": "Agent-XtQp3",
        "targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œAgent-XtQp3œ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
        "data": {
          "targetHandle": {
            "fieldName": "input_value",
            "id": "Agent-XtQp3",
            "inputTypes": [
              "Message"
            ],
            "type": "str"
          },
          "sourceHandle": {
            "dataType": "ChatInput",
            "id": "ChatInput-yAxS8",
            "name": "message",
            "output_types": [
              "Message"
            ]
          }
        },
        "id": "reactflow__edge-ChatInput-yAxS8{œdataTypeœ:œChatInputœ,œidœ:œChatInput-yAxS8œ,œnameœ:œmessageœ,œoutput_typesœ:[œMessageœ]}-Agent-XtQp3{œfieldNameœ:œinput_valueœ,œidœ:œAgent-XtQp3œ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
        "animated": false,
        "className": "",
        "selected": false
      },
      {
        "source": "Agent-XtQp3",
        "sourceHandle": "{œdataTypeœ:œAgentœ,œidœ:œAgent-XtQp3œ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}",
        "target": "ChatOutput-nfWQn",
        "targetHandle": "{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-nfWQnœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
        "data": {
          "targetHandle": {
            "fieldName": "input_value",
            "id": "ChatOutput-nfWQn",
            "inputTypes": [
              "Message"
            ],
            "type": "str"
          },
          "sourceHandle": {
            "dataType": "Agent",
            "id": "Agent-XtQp3",
            "name": "response",
            "output_types": [
              "Message"
            ]
          }
        },
        "id": "reactflow__edge-Agent-XtQp3{œdataTypeœ:œAgentœ,œidœ:œAgent-XtQp3œ,œnameœ:œresponseœ,œoutput_typesœ:[œMessageœ]}-ChatOutput-nfWQn{œfieldNameœ:œinput_valueœ,œidœ:œChatOutput-nfWQnœ,œinputTypesœ:[œMessageœ],œtypeœ:œstrœ}",
        "animated": false,
        "className": "",
        "selected": false
      },
      {
        "source": "CustomComponent-fTDig",
        "sourceHandle": "{œdataTypeœ:œCustomComponentœ,œidœ:œCustomComponent-fTDigœ,œnameœ:œapi_build_toolœ,œoutput_typesœ:[œToolœ]}",
        "target": "Agent-XtQp3",
        "targetHandle": "{œfieldNameœ:œtoolsœ,œidœ:œAgent-XtQp3œ,œinputTypesœ:[œToolœ,œBaseToolœ,œStructuredToolœ],œtypeœ:œotherœ}",
        "data": {
          "targetHandle": {
            "fieldName": "tools",
            "id": "Agent-XtQp3",
            "inputTypes": [
              "Tool",
              "BaseTool",
              "StructuredTool"
            ],
            "type": "other"
          },
          "sourceHandle": {
            "dataType": "CustomComponent",
            "id": "CustomComponent-fTDig",
            "name": "api_build_tool",
            "output_types": [
              "Tool"
            ]
          }
        },
        "id": "reactflow__edge-CustomComponent-fTDig{œdataTypeœ:œCustomComponentœ,œidœ:œCustomComponent-fTDigœ,œnameœ:œapi_build_toolœ,œoutput_typesœ:[œToolœ]}-Agent-XtQp3{œfieldNameœ:œtoolsœ,œidœ:œAgent-XtQp3œ,œinputTypesœ:[œToolœ,œBaseToolœ,œStructuredToolœ],œtypeœ:œotherœ}",
        "className": "",
        "selected": false
      },
      {
        "source": "CustomComponent-AAPMp",
        "sourceHandle": "{œdataTypeœ:œCustomComponentœ,œidœ:œCustomComponent-AAPMpœ,œnameœ:œapi_build_toolœ,œoutput_typesœ:[œToolœ]}",
        "target": "Agent-XtQp3",
        "targetHandle": "{œfieldNameœ:œtoolsœ,œidœ:œAgent-XtQp3œ,œinputTypesœ:[œToolœ,œBaseToolœ,œStructuredToolœ],œtypeœ:œotherœ}",
        "data": {
          "targetHandle": {
            "fieldName": "tools",
            "id": "Agent-XtQp3",
            "inputTypes": [
              "Tool",
              "BaseTool",
              "StructuredTool"
            ],
            "type": "other"
          },
          "sourceHandle": {
            "dataType": "CustomComponent",
            "id": "CustomComponent-AAPMp",
            "name": "api_build_tool",
            "output_types": [
              "Tool"
            ]
          }
        },
        "id": "reactflow__edge-CustomComponent-AAPMp{œdataTypeœ:œCustomComponentœ,œidœ:œCustomComponent-AAPMpœ,œnameœ:œapi_build_toolœ,œoutput_typesœ:[œToolœ]}-Agent-XtQp3{œfieldNameœ:œtoolsœ,œidœ:œAgent-XtQp3œ,œinputTypesœ:[œToolœ,œBaseToolœ,œStructuredToolœ],œtypeœ:œotherœ}",
        "className": "",
        "selected": false
      },
      {
        "source": "CustomComponent-rvzAl",
        "sourceHandle": "{œdataTypeœ:œCustomComponentœ,œidœ:œCustomComponent-rvzAlœ,œnameœ:œapi_build_toolœ,œoutput_typesœ:[œToolœ]}",
        "target": "Agent-XtQp3",
        "targetHandle": "{œfieldNameœ:œtoolsœ,œidœ:œAgent-XtQp3œ,œinputTypesœ:[œToolœ,œBaseToolœ,œStructuredToolœ],œtypeœ:œotherœ}",
        "data": {
          "targetHandle": {
            "fieldName": "tools",
            "id": "Agent-XtQp3",
            "inputTypes": [
              "Tool",
              "BaseTool",
              "StructuredTool"
            ],
            "type": "other"
          },
          "sourceHandle": {
            "dataType": "CustomComponent",
            "id": "CustomComponent-rvzAl",
            "name": "api_build_tool",
            "output_types": [
              "Tool"
            ]
          }
        },
        "id": "reactflow__edge-CustomComponent-rvzAl{œdataTypeœ:œCustomComponentœ,œidœ:œCustomComponent-rvzAlœ,œnameœ:œapi_build_toolœ,œoutput_typesœ:[œToolœ]}-Agent-XtQp3{œfieldNameœ:œtoolsœ,œidœ:œAgent-XtQp3œ,œinputTypesœ:[œToolœ,œBaseToolœ,œStructuredToolœ],œtypeœ:œotherœ}",
        "className": "",
        "selected": false
      },
      {
        "source": "CustomComponent-qUhcc",
        "sourceHandle": "{œdataTypeœ:œCustomComponentœ,œidœ:œCustomComponent-qUhccœ,œnameœ:œapi_build_toolœ,œoutput_typesœ:[œToolœ]}",
        "target": "Agent-XtQp3",
        "targetHandle": "{œfieldNameœ:œtoolsœ,œidœ:œAgent-XtQp3œ,œinputTypesœ:[œToolœ,œBaseToolœ,œStructuredToolœ],œtypeœ:œotherœ}",
        "data": {
          "targetHandle": {
            "fieldName": "tools",
            "id": "Agent-XtQp3",
            "inputTypes": [
              "Tool",
              "BaseTool",
              "StructuredTool"
            ],
            "type": "other"
          },
          "sourceHandle": {
            "dataType": "CustomComponent",
            "id": "CustomComponent-qUhcc",
            "name": "api_build_tool",
            "output_types": [
              "Tool"
            ]
          }
        },
        "id": "reactflow__edge-CustomComponent-qUhcc{œdataTypeœ:œCustomComponentœ,œidœ:œCustomComponent-qUhccœ,œnameœ:œapi_build_toolœ,œoutput_typesœ:[œToolœ]}-Agent-XtQp3{œfieldNameœ:œtoolsœ,œidœ:œAgent-XtQp3œ,œinputTypesœ:[œToolœ,œBaseToolœ,œStructuredToolœ],œtypeœ:œotherœ}",
        "className": "",
        "selected": false
      },
      {
        "source": "CustomComponent-LXya1",
        "sourceHandle": "{œdataTypeœ:œCustomComponentœ,œidœ:œCustomComponent-LXya1œ,œnameœ:œapi_build_toolœ,œoutput_typesœ:[œToolœ]}",
        "target": "Agent-XtQp3",
        "targetHandle": "{œfieldNameœ:œtoolsœ,œidœ:œAgent-XtQp3œ,œinputTypesœ:[œToolœ,œBaseToolœ,œStructuredToolœ],œtypeœ:œotherœ}",
        "data": {
          "targetHandle": {
            "fieldName": "tools",
            "id": "Agent-XtQp3",
            "inputTypes": [
              "Tool",
              "BaseTool",
              "StructuredTool"
            ],
            "type": "other"
          },
          "sourceHandle": {
            "dataType": "CustomComponent",
            "id": "CustomComponent-LXya1",
            "name": "api_build_tool",
            "output_types": [
              "Tool"
            ]
          }
        },
        "id": "reactflow__edge-CustomComponent-LXya1{œdataTypeœ:œCustomComponentœ,œidœ:œCustomComponent-LXya1œ,œnameœ:œapi_build_toolœ,œoutput_typesœ:[œToolœ]}-Agent-XtQp3{œfieldNameœ:œtoolsœ,œidœ:œAgent-XtQp3œ,œinputTypesœ:[œToolœ,œBaseToolœ,œStructuredToolœ],œtypeœ:œotherœ}",
        "className": "",
        "selected": false
      }
    ],
    "viewport": {
      "x": 411.17096095850354,
      "y": 75.9049245741246,
      "zoom": 0.36001650291823717
    }
  },
  "description": "Interaja com suas planilhas em linguagem natural",
  "name": "AI Sheet agent",
  "last_tested_version": "1.1.1",
  "endpoint_name": null,
  "is_component": false
}