Skip to content

Agent

Agent is NappAI’s main agent. It receives a message, understands it with the AI model you connect, decides whether it needs one of its tools (look something up in a CRM, search the web, read a spreadsheet…) and returns an answer. You define its behaviour with instructions written in plain language.

Use it whenever you want an assistant that talks to people or carries out a multi-step task inside a flow. When you need more, the Plug in advanced features switch adds features such as human approval before a tool is used, personal data detection, usage limits or automatic retries.

The Agent component on the canvas with its connections: System Prompt, Input, Model and Tools

On the canvas, the component shows the System Prompt, Batch Input and Input connections on the left; Model, Tools and, if you turn on Use Fallback Models, Fallback Models at the bottom; the Agent and Tool outputs at the top, and the Response output on the right. Double-click the component to open its settings, organised in the Common, Advanced, Tool and Batch Mode tabs.

When to use it

  • A customer service assistant that answers questions about orders, opening hours or returns.
  • An internal assistant that queries your tools (CRM, calendar, knowledge base) and summarises what it finds.
  • An automatic task inside a flow: classify an email, draft a reply or extract data from a text.
  • A specialist that another agent uses as a tool or delegates part of the work to.
  • A process in which a person must approve certain actions before the agent carries them out.

Configuration

Connections

ConnectionWhat to connect
Model (required)An AI model component, for example OpenAI. It is the model the agent thinks and answers with.
ToolsThe tools the agent can use: integration components, searches, other agents connected through their Tool output, and so on. You can connect several. With Request Approval the agent can stop to wait for an approval.
Fallback ModelsAppears when you turn on Use Fallback Models (Reliability group of Plug in advanced features). One or more backup models. If the main model fails (the provider does not answer, a usage limit is exceeded, it takes too long or returns an error), the agent repeats that same step with the first backup model and, if that also fails, with the next one, in order. The conversation and what the tools already did are kept: only the call that failed is repeated. When the model switches, the run’s log shows which model answered. Waiting for an approval is not a failure, so it does not switch models.

Common tab

FieldWhat it does
Agent NameThe agent’s name. It is used when another agent uses it as a tool or subagent. Default: Agent.
Agent DescriptionExplains what the agent does. Another agent reads it to decide when to turn to it.
User PromptThe template of the message the agent receives. Default: {input}. Each word in curly braces is a variable and becomes a field of its own on the component (see below).
System PromptThe behaviour instructions: who the agent is, what tone it uses, what it can and cannot do. Write them here or connect a Prompt component. Default: You are a helpful AI assistant.
InputThe message the agent must process, usually connected from Chat Input. It is the field of the {input} variable in User Prompt.

How User Prompt variables work. For every variable you write in curly braces in User Prompt, a field with that same name appears, which you can fill in or connect to another component. For example, with Customer: {customer}. Request: {input} the component shows the customer and Input fields. If you remove a variable from the template, its field disappears. The agent always knows today’s date, so you don’t need to pass it.

Advanced tab

FieldWhat it does
Recursion LimitThe maximum number of internal steps the agent can take in one answer. When it is reached, the agent stops. Default: 1000.
Use memoryThe agent remembers the conversation: each new message takes the previous ones in the same conversation into account. Turning it on shows the Memory connection and, in the Context and Memory tab, the memory strategy.
StreamThe answer appears in the chat as it is generated, instead of arriving all at once at the end. Turning it on shows Stream Thinking, which also shows the model’s reasoning as it is generated.
Use structured outputThe answer follows a fixed format you define. Turning it on shows the Output Format tab with Structured Output Schemas (the description of the fields the agent must return) and Structured Output Strategy (Provider Strategy or Tool Strategy, two ways of asking the model for that format). If the answer does not match the format, the run fails.
Include State in responseAdds the agent’s internal run data to the answer, for example the Custom State data.
Plug in advanced featuresShows the advanced features described below. Default: off.

Memory strategy. With Use memory on, choose Memory Strategy in the Context and Memory tab:

  • Trim (default): the model only receives the latest messages. Memory Limit sets how many; -1 means all of them.
  • Delete Oldest: the oldest messages are deleted when Memory Limit is exceeded.
  • Summarize: when the conversation exceeds Max Tokens (default 4000), older messages are summarised and the latest ones set in Messages to Keep (default 20) are kept.

The Memory connection is optional: connect a component such as Redis Memory, Postgres Memory or Mem0 Cloud Memory to keep the conversation in your own service. If that component includes long-term memory, the agent can also save and search important details the user shares, such as their preferences. If you connect nothing, NappAI keeps the conversation for you.

Advanced features

Turning on Plug in advanced features shows several switches in the Advanced tab, all off by default. Each one, when switched on, shows its own fields in a tab named after its group.

Agent Capabilities

SwitchWhat it does
Add PlanningFor multi-step tasks, the agent creates a task list and ticks items off as it progresses.
Rubric self-evaluationBefore giving its final answer, a reviewer checks the work against your criteria and, if something is missing, the agent keeps working. Shows the Rubric tab (see below).
SubagentsLets the agent delegate tasks to other agents. Shows the Subagents tab with the Subagents connection, where you connect the Agent output of other agents. Each one is presented with its Agent Name and Agent Description.

Supervision and Security

SwitchWhat it does
Enable PII DetectionDetects personal data in messages and decides what to do with it. Shows Add Personal Information Detection: choose the data type (email, credit_card, ip, mac_address or url) and click the + button to add a rule. Each rule has PII Strategy (block stops the run; redact, the default, replaces the data with a marker; mask hides part of it; hash replaces it with a code that is always the same for the same value) and three checkboxes: Apply to user input (on), Apply to model output and Apply to tools output. The bin icon removes the rule.
Human-in-the-LoopA person approves certain tools before the agent uses them. Shows Add Tool for Human Approval: type the exact tool name and click +. Each rule has Tool name, Require approval (on), Allowed decisions (approve, edit, reject; approve and reject by default) and Tool description, the text the approver will see. With edit, the approver can change the data the tool will be used with before approving. It also shows Approval Deadline (hours), how long the approval can wait (default 72; 0 to 720; 0 for no deadline), and If Nobody Answers, what happens when the deadline passes: Reject the action (default; the action is rejected and the agent carries on) or Leave it expired (the approval expires and the agent stays stopped). It turns on Use memory automatically.

When the agent wants to use a tool that needs approval, it stops and waits, even if the answer takes days. In a published flow, the request appears in the Approvals inbox and has its own private link to answer it, which the flow can send by email or chat to whoever must approve. It can also be answered in the conversation itself: “yes” or “approve” to continue, “no” or “reject” to cancel that action. In the editor’s playground, the agent asks in the chat.

Resource and Cost Control

SwitchWhat it does
Tool call limitLimits how many times the agent can use a specific tool. Shows Add Tool Call Limit: type the tool name and click +. Each rule has Tool name, Thread limit (maximum across the whole conversation; 0 for no limit), Run limit (maximum per run; default 5) and Exit behavior (continue, error or end).
Model call limitLimits calls to the model to control cost: Thread limit (across the whole conversation; default 10), Run limit (per run; default 5) and Exit behavior (end finishes the answer, error stops the run with an error).

Context and Memory

SwitchWhat it does
Custom StateAdds your own data that the agent keeps during the run. In State custom schema you describe that data (name, type and description of each item), and a field appears for each item so you can give it a starting value.
Context editingKeeps the conversation light: when it exceeds Token count (default 100), it replaces old tool results with the Placeholder text (default [cleared]). Tool messages to keep sets how many recent results are always kept (default 3), Clear tool inputs also clears what was sent to the tool, and Exclude tools lists, separated by commas, the tools that are never trimmed. It turns on Use memory automatically.

Reliability

SwitchWhat it does
Model retryAutomatically repeats a model call that fails: Retry attempts (default 2), Backoff factor (multiplier for the wait between attempts; default 1.0), Initial delay (s) (wait before the first retry; default 0.0) and On failure (continue carries on, error stops the run).
Use Fallback ModelsShows the Fallback Models connection at the bottom of the component, to connect backup models. They are only used with this switch on.
Tool retryRepeats a specific tool when it fails. Shows Add Tool Retry: type the tool name and click +. Each rule has Tool name, Retry attempts, Backoff factor, Initial delay (s) and On failure.

Tool Optimization

SwitchWhat it does
LLM tool emulatorFor testing: instead of running the tools, an AI model makes up a plausible result. This lets you test the agent without touching your real services. Tools to emulate lists the tools that are simulated (empty: all of them) and Emulator llm lets you connect a different model to simulate them.
Optimize tool selectionWhen the agent has many tools, the model first picks the most useful ones for each request. Max tools sets how many are passed to the agent (default 3) and Always include tools lists the ones that are always included.

Monitoring

SwitchWhat it does
Tool notificationsReports each tool use while the agent works (duration, a summary of what was sent and received, errors). Verbose logging, Log inputs and Max preview length (default 500 characters) adjust that log.

Rubric tab. With Rubric self-evaluation on:

FieldWhat it does
RubricThe criteria that define finished work, one per line. It comes with four example criteria (the answer resolves the request, invents nothing, is consistent, and respects the requested format, length and language). If you leave it empty, nothing is reviewed.
Grader System PromptThe reviewer’s instructions. It comes pre-filled; if you empty it, the default instructions are used.
Max Grading IterationsThe maximum number of reviews (default 3). If they are reached without approval, the agent delivers its last answer.
Use Separate Grader ModelUses a different model to review. Turning it on shows the Grader Model connection.

Guardrails

In the Advanced tab, Guardrails gives the agent rules it never breaks: every request, and every action before a tool is used, is checked. See Guardrails, with an example video.

Using it as an agent tool

You can connect this component to an agent’s Tools input. In the Tool tab, Tool Name and Tool Description are the name and explanation the agent uses to recognise the tool and decide when to call it: write a clear description of what it does.

When another agent uses it as a tool, that agent fills in the fields that come from the User Prompt variables, such as Input.

Batch processing

With the Batch Mode switch on, the component runs once for each item of the list you connect to Batch Input and returns all the results together as a list. Parallel Executions sets how many items are processed at the same time (1 to 5). Skip if Empty Batch Input skips the component when the list arrives empty, and Skip Branch if Empty Output stops the following components when the result is empty. More in Key concepts.

Output

  • Response: the agent’s answer as a message. Connect it to Chat Output to show it in the chat, or to any component that takes text. If you use Use structured output, the message also carries the data in the format you defined.
  • Agent: the configured agent, to connect it to another agent that delegates to it, for example to Worker Agents on Supervisor Agent or to Subagents on another Agent or on a Deep Agent.
  • Tool: the agent turned into a tool, to connect it to another agent’s Tools input.

Example

Asistente de soporte is an example flow for the furniture shop Muebles Lumen:

  1. A Chat Input component receives the customer’s question and is connected to the Agent’s Input.
  2. A Prompt component with the instructions (“You are the support assistant of Muebles Lumen. You answer kindly about orders, delivery times and returns…”) is connected to System Prompt.
  3. An OpenAI component is connected to Model.
  4. The Response output is connected to Chat Output, which shows the answer in the chat.

Example flow Asistente de soporte: Prompt and Chat Input connected to the Agent, with an OpenAI model, and the answer in Chat Output

To make the assistant remember what the customer said earlier, turn on Use memory in the Advanced tab. If you later want it to check the real status of orders, connect your order system’s component to Tools.

Good practices

  • Write a specific System Prompt: who the agent is, who it works for, which topics it covers and what it should do when it doesn’t know something.
  • Give every tool and every connected agent a clear description; the agent relies on it to choose.
  • Start without advanced features and add only the ones you need. To test without touching real services, use LLM tool emulator.
  • If the agent performs actions with consequences (sending emails, creating orders), protect them with Human-in-the-Loop or with the Request Approval tool.
  • Turn on Use Fallback Models and connect a model from a different provider: if one provider stops answering, the agent keeps working with the other.