The intelligence of this entire automation lies within its AI Agent nodes. These are not simple "ask a question, get an answer" components; they are orchestrators that follow complex instructions, use external tools, and make structured decisions. Here’s a breakdown of the logic and "thinking process" of each agent as defined in the scenario.


šŸ¤ How the Agents Communicate with Their Tools

The connection between an AI Agent and its tools isn't magic; it's managed by a special placeholder function:Ā {{fromAIAgent()}}. This function acts as a dedicated listening channel, waiting for a specific command from its parent AI Agent.

Here’s how it works in practice:

  1. The Agent Decides:Ā Based on the user's prompt and its own internal rules, the AI Agent decides it needs to use one of its tools. For example, it might decide, "I need to search the internal documentation."
  2. The Agent Formulates a Command:Ā The agent internally creates a "command" that includes the name of the tool it wants to use and the specific data (the argument) it needs to send. For example:Ā Command: Use tool 'rag_database_docs' with the search query 'HTTP node configuration'.
  3. The Platform Intercepts:Ā The workflow sees this command. It looks at the tool node namedĀ rag_database_docs.
  4. The Command Activates:Ā For example, inside theĀ rag_database_docsĀ node, a tool used by first_message_agent, the theĀ queryĀ parameter is set toĀ {{fromAIAgent("Body" ; "search query")}}. The platform sees this command and injects the agent's search query ("HTTP node configuration") into that exact spot.
  5. The Tool Executes:Ā TheĀ rag_database_docsĀ node now runs its HTTP request, but with the data provided by the agent.
  6. The Result is Returned:Ā The output from the tool (the search results) is sentĀ backĀ to the AI Agent. The agent can now use this new information to formulate its final, helpfulĀ messageĀ for the user.

TheĀ fromAIAgentĀ function has two parts:Ā {{fromAIAgent("ArgumentName" ; "Command")}}.

šŸ¤– Agent 1:Ā first_message_agentĀ (Node 9) - The Frontline Triage

This agent is the first point of contact. Its entire design revolves around speed, efficiency, and a single, critical decision: is this message legitimate or is it spam?

šŸ“œ Core Directive & Personality:

🚦 Decision-Making Framework (The Prompt's Rules):

šŸ› ļø How It Uses Its Tools:

The agent is aware of three tools it can call by name using the tag fromAIAgent to gather information before formulating itsĀ message. It decides which to use based on the user's prompt.