First Agent Flow
This guide describes the baseline flow to build before adding custom skills or a production UI.
Required Pieces
Section titled “Required Pieces”Create these config nodes first:
agent-connection: model provider URL and API key.agent-model: primary model, optional secondary model, and temperature.agent-behaviour: system instructions, max iterations, and debug mode.agent-memory: facts store, events store, and memory scope.agent-budget: optional token or spend limit.
Then create these flow nodes:
agent-in: converts a normal Node-RED message into the format the agent expects.agent: runs the agent.
Baseline Wiring
Section titled “Baseline Wiring”incoming message -> agent-in -> agent -> downstream response handlerUse agent-in in Message mode:
Session ID: usuallymsg.topicfor chat/channel style integrations.Message: usuallymsg.payload.User ID: optional. Set this when memory should follow a user across sessions.
Configure the agent node with the connection, behaviour, model, memory, and optional
budget config nodes. Choose one context mode:
Full Conversation: sends all stored history.Summarized: keeps a summary plus a recent window.Last N Messages: sends only the latest messages.None: stateless requests.
Direct Message Test
Section titled “Direct Message Test”You can test the agent with a simple message through agent-in, or send an advanced
request directly to the agent node:
{ "jsonrpc": "2.0", "id": "request-1", "method": "agent.request", "params": { "sessionId": "demo-session", "content": { "text": "Say hello in one sentence." } }}Use placeholder values when testing or writing examples.
Adding A Skill
Section titled “Adding A Skill”Use agent-skill when the agent needs to call flow logic.
- Add an
agent-skillnode on the same flow tab. - Define one or more actions with a name, description, and parameters.
- Select the skill in the
agentnode’s skill set. - Wire each skill output to the action logic.
- Return the result through
agent-ininTool Responsemode.
The agent adds correlation fields to skill calls. The tool response must preserve those fields so the result is returned to the correct session.
Keep Examples Safe
Section titled “Keep Examples Safe”Do not save real API keys, customer records, internal URLs, private credentials, or private user messages in flow names, skill descriptions, screenshots, or docs.