Agent
The Agent component acts as your personal AI assistant within the Nappai automation system. It is designed to handle complex tasks by combining the power of large language models with external tools. Unlike a standard chat bot that simply replies to text, this agent can “think” through a problem, look up information, perform calculations, or interact with other apps to find the best answer for you.
How it Works
Think of the Agent as a smart worker who has access to a library of resources (tools). When you give it a task, it doesn’t just guess the answer. Instead, it follows a logical process:
- Understands the Goal: It reads your instruction to understand exactly what you need.
- Checks Resources: It looks at the tools available to it (such as search engines, calculators, or databases) to see which one can help.
- Uses Tools: If it needs more information or a specific action, it uses the appropriate tool. For example, if you ask for today’s news, it might use a “Search” tool.
- Refines the Answer: After using a tool, it reviews the new information and combines it with your original request to give you a final, accurate response.
This component uses the LangChain 1.0 framework, which is a popular standard for building AI applications. This ensures that the agent is reliable, efficient, and can handle a wide variety of tasks by connecting to different data sources.
Connection & Credentials
This component interacts with external AI services to generate responses. To use it, you must ensure that you have a valid Credential configured in your Nappai panel.
- Go to the Credentials section in your Nappai panel.
- Create a new credential for the AI service you wish to use (e.g., OpenAI, Anthropic, etc.) and fill in the required API keys or tokens.
- In your workflow, select the saved credential in the Credential input field of this node.
Note: If you do not connect a credential, the Agent will not be able to process requests or generate responses.
Operations
This component does not offer multiple distinct operations. It functions as a unified “Advanced Agent” that automatically handles reasoning and tool usage based on your input. You simply provide the input, and the Agent determines the best way to achieve the result.
Inputs
The following fields are available to configure this component. Some fields may only be visible depending on the specific configuration or “tools” you have attached to this agent.
-
Input (Text/Message): [The main task or question you want the Agent to solve. This is the prompt that the AI will read and process.]
-
System Prompt (Text): [Optional instructions that set the behavior, tone, or rules for the Agent. Use this to guide how the Agent should behave (e.g., “Always be concise” or “Act as a helpful customer support agent”).]
-
Tools (List): [A list of external tools or functions the Agent is allowed to use. You must connect other components here that provide specific capabilities, such as a “Search” tool or a “Calculator” tool.]
-
History (List): [Optional. Previous messages in a conversation. This allows the Agent to remember context from earlier steps in your workflow.]
Note: Specific input fields like ‘Temperature’ (which controls creativity) or specific tool connections may vary depending on how your workflow is built. Ensure you connect the necessary tools for the Agent to function effectively.
Outputs
The Agent produces a structured response that includes the final answer to your query, along with metadata about how it reached that conclusion.
Output Data Example (JSON)
json { “output”: “The sales data for Q3 shows a 15% increase compared to Q2.”, “reasoning”: “I retrieved the sales data using the ‘DatabaseQuery’ tool, analyzed the numbers, and summarized the trend.”, “used_tools”: [“DatabaseQuery”], “status”: “success” }
- output: The final answer or text generated by the AI.
- reasoning: A brief explanation of the steps the Agent took to solve the problem (useful for debugging or transparency).
- used_tools: A list of the tools that were actually used to solve the task.
Connectivity
In a typical workflow, the Agent component is used as a central processing node:
-
Incoming Connections:
- From Data Sources: Connect inputs from previous steps that contain user questions, raw text, or data queries.
- From Tools: You must connect “Tool” components (such as Search, Calculator, or API Fetchers) into the Agent’s tool inputs. Without these connections, the Agent cannot perform external actions.
-
Outgoing Connections:
- To Response/Display Nodes: Connect the
outputof the Agent to a “Respond” or “Text Display” component so users can see the final answer. - To Next Actions: If the Agent’s output is data-driven, you can connect it to other automation steps that require that processed information.
- To Response/Display Nodes: Connect the
Usage Example
Scenario: Automating Customer Support Queries
- Trigger: A new customer question is received via email.
- Process: The question is sent to the Agent component.
- Configuration: You have connected a “Knowledge Base Search” tool to the Agent.
- Action: The Agent reads the customer’s question, uses the Search tool to find the relevant FAQ in your database, and formulates a helpful response.
- Output: The final response is sent back to you or automatically replied to the customer.
Tips and Best Practices
- Define Clear Instructions: Use the “System Prompt” field to give the Agent clear instructions on how to behave. This reduces errors and ensures the tone matches your brand.
- Provide Relevant Tools: The Agent is only as powerful as the tools you give it. Only connect tools that are necessary for the specific task to keep the workflow efficient.
- Test Iteratively: If the Agent struggles with a task, try breaking the problem down into smaller steps or providing more context in the input.
- Monitor Tool Usage: Check the “used_tools” output to see which tools were invoked. This helps you understand if the Agent is using the right resources for your needs.
Security Considerations
- API Key Protection: Ensure your API credentials are stored securely in the Nappai panel and not shared in plain text within your workflow.
- Tool Permissions: Be careful when connecting tools that can modify data (like databases or CRMs). Ensure the Agent only has access to tools and data that are necessary for the task.
- Data Privacy: Avoid sending sensitive personal information (like passwords or credit card numbers) to the Agent unless you are certain the connected AI provider complies with your data privacy regulations.