Module · Real Channels & AI
Bringing in AI: the Agent node
Lesson 6 of 8 · 8 min
Everything you have built so far is deterministic. Given the same input, the trigger fires the same way, the condition takes the same branch, the CRM write saves the same field. You could predict every run on paper.
The AI Agent node is the first one that decides. And the most useful thing to understand about it is not that it is clever — it is that it is still just a node. It has a form, it takes inputs, it produces an output, and the node after it does not know or care that an AI was involved.
A chatbot replies. An agent decides and acts. That difference is the whole product. A chatbot's output is the point; an agent's output is the input to the next node — a CRM field, a branch, a message someone actually receives.
The agent from lesson 1
You have already run one. In lesson 1's workflow the third node is a Core Agent, and this is its real configuration:
One agent, three settings and a job description
The whole node. Everything that makes this agent different from any other agent is in the prompt.
Scroll for all 4 steps →
Three of those four are plumbing. llm_integration_id says which provider account pays for the call, model says which model answers, and temperature says how much variation to allow — low for classification and extraction, higher when you want range in the wording. This agent runs at 0.2 because there are only three acceptable answers and none of them benefit from creativity.
The prompt is the job description
The fourth setting is the one that matters. Here is this agent's actual prompt — the exact text that ran:
## Role
You classify inbound leads for Expedify AI Academy.
## Available Context
- Name: {{new_contact.new_data.first_name}} {{new_contact.new_data.last_name}}
- Email: {{new_contact.new_data.email}}
- Job title: {{new_contact.new_data.job_title}}
- Where they came from: {{new_contact.new_data.source}}
- Lead score: {{new_contact.new_data.lead_score}}
## Objective
Decide how warm this lead is from the context above.
## Output Format
Reply with exactly one lowercase word and nothing else: hot, warm, or cold.Notice the shape. Each ## Header is a section, and the builder renders one card per heading — Role, Objective, Instructions, Constraints, Output Format. You are not writing an essay. You are filling in a job description for something that will do this thousands of times without asking you a question.
- Role — who it is. One sentence, and it sets the vocabulary for everything else.
- Objective — the decision it has to reach. If you cannot write this in one line, the agent is being asked to do two jobs.
- Output Format — the single highest-value section in the whole prompt, because the next node has to consume it. This one says “exactly one lowercase word and nothing else”, which is why the CRM write can drop the answer straight into a field.
An agent cannot see what started the workflow
Look at the ## Available Context section, and at what is inside it: not descriptions of the data, but live references — the same {{ }} you learned in lesson 4.
This is not optional decoration, and it is the mistake that wastes the most time. An agent receives nothing automatically. If you do not write the references in, the model runs with a prompt that describes a job and contains none of the facts — and it will still answer, confidently, about a lead it knows nothing about. The product now refuses to call such a workflow runnable, precisely because a fully static prompt on a trigger-driven agent is always a bug.
When this workflow ran, the engine resolved those references before the model ever saw them — {{new_contact.new_data.first_name}} had become Course, and the agent answered cold. The prompt you write is a template; what the model reads is that template filled in.
Tools: how an agent acts
An agent with no tools can only produce text. Give it tools and it can search a knowledge base, read a CRM record, book a meeting — choosing for itself which to use and when, based on what the prompt told it to do.
Tools are attached to an agent, not wired into the flow. This surprises everyone once. A tool node sits off to the side, connected to the agent rather than to the nodes before and after it, because it does not run at a fixed point in the sequence — it runs if and when the agent decides to call it. Lesson 8 builds one.
Lesson 1's agent has no tools, and that is the right choice for it: it makes a judgement and hands back a word. The workflow does the acting — the CRM node writes the answer. Not everything an agent decides has to be executed by the agent.
What you get back
Whatever the agent produced is available as {{qualify.output}} — plain text, which is exactly what lesson 1's CRM node writes into lead_status. Text is the default and it is usually enough. When a later node needs to branch on several distinct fields, an agent can be asked for structured JSON instead, but reach for that when a plain string genuinely will not do.
Key takeaways
- An agent is still a node: a form, an input, an output. The node after it cannot tell an AI was involved.
- Model, temperature and integration are plumbing. The prompt is the job.
- Write the prompt as ## sections — Role, Objective, Instructions, Output Format.
- Output Format is the highest-value section, because the next node has to consume the answer.
- An agent sees nothing automatically. Put {{ }} references in ## Available Context or it runs blind.
- Tools attach to the agent, not into the flow — the agent decides if and when to call them.
- Read the answer as {{alias.output}}, and let the workflow do the acting.
Try it yourself
Rewrite the Output Format line above to allow a fourth answer — say “unknown”, for a lead with too little information to judge. Then ask the harder question the change forces: what should lesson 5's condition do when it receives it? Deciding that is the work. Wiring it is the easy part.
Next: Reaching your customer — the last node in the chain, and the only one that cannot be undone.

