n8n agents official
Use when the user wants an agent, assistant, or bot in n8n, or is building, editing, testing, publishing, or debugging a first-class n8n Agent. Covers choosing an Agent vs a workflow vs the AI Agent node, the Agent MCP tools (create_agent, mutate_agent, validate_agent, call_agent, publish_agent, update_agent_integration), Agent config JSON, tools and approvals, skills, sub-agents, model routing, knowledge files, vector stores, memory and sessions, Slack / Telegram / Discord / Linear / n8n Chat channels, scheduled tasks, the Message an Agent node, and reading Agent sessions and traces. Triggers on "build me an agent", "assistant", "chatbot", "Slack bot", "Telegram bot", "agent skills", "sub-agent", "knowledge base", "agent memory", "session", "Message an Agent", "publish the agent", or any Agent tool call.
By- name:
- n8n-agents-official
- description:
- Use when the user wants an agent, assistant, or bot in n8n, or is building, editing, testing, publishing, or debugging a first-class n8n Agent. Covers choosing an Agent vs a workflow vs the AI Agent node, the Agent MCP tools (create_agent, mutate_agent, validate_agent, call_agent, publish_agent, update_agent_integration), Agent config JSON, tools and approvals, skills, sub-agents, model routing, knowledge files, vector stores, memory and sessions, Slack / Telegram / Discord / Linear / n8n Chat channels, scheduled tasks, the Message an Agent node, and reading Agent sessions and traces. Triggers on "build me an agent", "assistant", "chatbot", "Slack bot", "Telegram bot", "agent skills", "sub-agent", "knowledge base", "agent memory", "session", "Message an Agent", "publish the agent", or any Agent tool call.
n8n Agents
A first-class n8n Agent is a saved resource with its own instructions, model, tools, skills, sub-agents, memory, channels, scheduled tasks, versions, and spend limits. It is configured as JSON through the Agent MCP tools, never with Workflow SDK code. The AI Agent node inside a workflow is a different thing, covered by n8n-ai-nodes-official.
Agents are generally available. The UI shows a Preview tag because they change often and some features you might expect aren't there yet. They aren't ready for Enterprise yet: an Enterprise instance may have them enabled, but don't assume it. If create_agent isn't in your tool list, Agents aren't enabled on this instance. Say so and offer a workflow instead of guessing.
Non-negotiables
- Always send a memory block when creating over MCP:
"memory": { "enabled": true, "storage": "n8n" }. The UI adds it on every save.create_agentsaves exactly what you send, and without it the Agent forgets the previous turn even inside one session (verified live). - Never publish without the user's explicit OK. A built Agent is a draft. Configuring a channel on an already published Agent connects it immediately, so confirm that too.
- Publish what the Agent calls. Workflow tools need a When Executed by Another Workflow trigger, the same project, and a published workflow (
validate_agentreports it). Saved sub-agents must be published too, and nothing checks that: validation and publishing pass, then production delegation fails and the parent quietly answers on its own. - Approval on anything that sends, changes, deletes, or spends, and know what the approver will see. See
references/APPROVALS.md. - One
mutate_agentper change, always with the latestconfigHash. A stale hash returnsstale_config: callget_agentand retry.
Agent, workflow, or AI Agent node?
Decide before calling any build tool. The first question is the "say it out loud" test.
| You can... | Build |
|---|---|
| Say every step before the request arrives, none needs judgment | Workflow |
| Say every step, one needs judgment (label, extract, summarize, write) | Workflow with an AI step: Text Classifier, Information Extractor, chain, or AI Agent node (n8n-ai-nodes-official) |
| Not say the steps until you see the request, and people talk to it or it acts on its own | First-class n8n Agent |
| Not say the steps, but one of the limits below applies | AI Agent node in a workflow |
| Not say the steps, and a fixed pipeline also needs the same brain | First-class Agent, called from the workflow with Message an Agent. The agent decides, the workflow acts |
"Build me an agent" or "assistant" means a first-class Agent unless a limit applies. A Chat Trigger plus an AI Agent node is not a substitute for a requested Agent. If a request is really a fixed trigger plus fixed steps, explain the mismatch and ask before building a workflow instead.
Current limits that point to the AI Agent node
<!-- TEMPORARY: revisit when n8n adds custom approval messages for Agent tools. --> <!-- TEMPORARY: revisit when channel approval cards (Slack, Telegram, Discord) show the tool's parameters. --> <!-- TEMPORARY: revisit when Agent tools can read run context (trigger or upstream node data) in expressions. --> <!-- TEMPORARY: revisit if n8n lets a workflow key into a native channel session (or the reverse). -->| Need | Why an Agent can't do it today | Use instead |
|---|---|---|
| Custom approval message, or the approver must see the parameters in Slack | Approval is on/off with a fixed message. Channel cards show the tool name only | A workflow tool that runs its own send-and-wait approval with the values (can post in the same Slack thread) |
| Trigger or node data mapped exactly into a tool parameter | Tool expressions only see the model's own arguments (verified live for node and workflow tools) | AI Agent node, or Message an Agent with structured output and downstream nodes doing the mapping |
| One conversation shared by a native channel and workflows | Channel threads and Message an Agent session keys live in separate namespaces | A shell workflow on the platform's trigger, calling the Agent with Message an Agent |
| Approval inside a Message an Agent call | Fails with "Suspend/resume is not supported in workflow execution context" | Gate the action in the calling workflow |
MCP build sequence
get_agent_builder_referenceonce. ItsconfigSchemais the source of truth for field names; trust it over this skill when they differ.search_projects, thendiscover_agent_assets(models,integrations,workflows,subagents,mcpServers),list_credentials, andsearch_nodeswithusage: "agentTool"+get_node_typesfor node tools.create_agentwith model, credential, instructions, memory block, and ordinary tools. Skills, tasks, and custom tools come after, throughmutate_agent, because they need server-generated ids.mutate_agent, one operation per call.skill.upsertdoesn't changeconfigHash; config patches do.validate_agentuntilvalid: trueandmissingis empty.- One representative
call_agent. It runs the draft through Preview with real tools, so side effects happen: if any tool without approval sends, writes, or pays, ask the user before the test. Every returned approval goes to the human; resume each with itscontinuation. - Report the draft with the
urlfromvalidate_agent, plus the session link (seereferences/SESSIONS_AND_DEBUGGING.md), and ask whether to publish. publish_agentonly on an explicit yes. Channels:update_agent_integration(references/CHANNELS.md).
Details on every operation, error code, and version tool: references/MCP_BUILD.md.
Where depth lives
| File | Read when |
|---|---|
references/MCP_BUILD.md |
Any mutate_agent operation, error codes, versions, revert, delete, availableInMCP |
references/CONFIG.md |
Writing or reviewing Agent JSON: every field, limits, defaults, what is versioned |
references/TOOLS.md |
Node, workflow, custom, MCP server, and built-in tools, input modes, what expressions can see |
references/APPROVALS.md |
Adding approval, what each surface shows, where approval can't happen, custom approval through a workflow tool |
references/SKILLS.md |
Adding Agent skills: how loading works, writing descriptions, references |
references/SUB_AGENTS.md |
Delegation, saved vs inline sub-agents, model routing by difficulty |
references/KNOWLEDGE.md |
Uploaded knowledge files vs external vector stores |
references/MEMORY.md |
Memory kinds, session scopes, session keys |
references/CHANNELS.md |
Slack, Telegram, Discord, Linear, n8n Chat, or "native channel or shell workflow?" |
references/TASKS.md |
Scheduled tasks |
references/MESSAGE_AN_AGENT.md |
Calling an Agent from a workflow |
references/SESSIONS_AND_DEBUGGING.md |
Anything went wrong, or the user asks where to see what the Agent did |
For a chat bot built as a workflow shell (platforms without a native channel, slash commands, custom routing), the shell patterns live in n8n-ai-nodes-official references/CHAT_SURFACE_PATTERNS.md, section "Core as Message an Agent". Its one rule that can't wait: on surfaces that deliver the bot's own messages (Slack, Discord), a shell that posts replies must filter out the bot's user ID right after the trigger, or it triggers itself forever.
Writing instructions
Instructions are the system prompt. Same split as the node: persona, rules, output format, and inter-tool flow go in instructions; how to call a specific tool goes in that tool's description. Long procedures the Agent needs only sometimes belong in a skill, which costs tokens only when loaded. Say where to deliver results ("post the summary in #ops"), because a scheduled run has no one to reply to.
Anti-patterns
| Anti-pattern | What goes wrong | Fix |
|---|---|---|
create_agent without memory |
Agent forgets the previous turn even in one session | Send { "enabled": true, "storage": "n8n" } |
| Chat Trigger + AI Agent node when the user asked for an agent | Loses channels, sessions, approvals, versions, tasks, and budgets | First-class Agent, unless a limit applies |
| Publishing because validation passed | The user didn't approve a live Agent, and channels go live with it | Report the draft and ask |
| Saved sub-agent left unpublished | Production delegation fails silently; the parent answers without it | Publish children before the parent goes live |
Expression in a tool input that reads $('Webhook') or $json.<trigger field> |
Only the model's arguments are visible, so the value is empty or wrong | Pass it through the message, or keep the mapping in a workflow |
| Approval on a tool the Agent calls under Message an Agent or a task | Run fails, or parks with no one to answer | Gate in the calling workflow; give tasks only safe tools |
| Same Message an Agent session key for two Agents in a project (e.g. both keyed on a bare Telegram id) | Keys are project-wide, not per Agent: the second Agent fails with "Failed to create the agent execution record" | Prefix keys per Agent: support-<telegramId> |
| Skill body says "read references/x.md" vaguely | The model often skips it | "Load references/x.md with load_skill (filePath) before answering" |
Integrations set through config.patch |
Rejected | update_agent_integration |
| Slack connected with a credential built for a Slack Trigger | Passes every check, receives nothing | Managed setup, or an app whose request URL points at this Agent |
Open this reference as its own page
Approvals
Before adding or skipping approval, ask the user: who signs off and how much they trust the model is their call. Recommend it for anything that sends, changes, deletes, or spends.
How to turn it on
- Node, workflow, and custom tools:
"requireApproval": true. - MCP servers:
"approval": { "mode": "global" }or{ "mode": "selected", "tools": [...] }. - Channel actions:
discover_agent_assets kind=integrationslists each channel'sapprovableActions, markedsensitive(e.g. Slacksend_dm,send_channel_message).
What the approver sees
<!-- TEMPORARY: revisit when n8n adds custom approval messages for Agent tools. --> <!-- TEMPORARY: revisit when channel approval cards (Slack, Telegram, Discord) show the tool's parameters. -->Approval is on or off. There's no custom message, title, or button label.
| Surface | Shows | Buttons |
|---|---|---|
| Preview and n8n Chat | "Approval required", "The agent wants to run the {tool} tool.", and the tool's arguments as raw JSON | Allow once, allow for the rest of the session, deny |
| Slack, Telegram, Discord | "The agent wants to run this tool: {tool}" and a Tool field. No arguments | Approve, Allow for this session, Deny |
call_agent |
approvals[] with toolName, displayName, args, and a continuation |
Resume with { "type": "approval", "approved": true or false, "continuation": {...} } |
| Sessions trace | "Approval request for {tool}" with the arguments under Request details, then "Approval response for {tool}" marked Approved or Declined |
Consequences:
- A Slack approver signs off blind. If the values matter (amount, recipient), approval in a channel isn't enough; use a custom approval workflow tool (below) or the AI Agent node's human review tools.
- The label is the display name. For a workflow tool, that's the workflow's name, not the tool
namethe model sees. Name approval-gated workflows so the label reads well ("Refund customer", not "WF 12 v2"). - Anyone who can see a channel card can click it. Approval in a shared channel is approval by whoever clicks first.
- A denial goes back to the model as a refusal; it continues the conversation without the tool.
Where approval can't happen
| Context | Result |
|---|---|
| Message an Agent (workflow call) | The node fails: "Agent execution suspended waiting for tool approval. Suspend/resume is not supported in workflow execution context." (verified live) |
| Scheduled task | No one is in the conversation, so the run parks waiting for an answer that never comes |
Give Agents that run from workflows or tasks only tools that are safe without approval, and gate the action in the calling workflow instead (agent returns a structured decision, workflow sends a send-and-wait approval, then acts).
Custom approval through a workflow tool
<!-- TEMPORARY: workaround for fixed approval messages and parameter-less channel cards. Update when custom approval messages are added. -->When the approver must see real values, or the message must be custom, build the approval into a workflow tool: send-and-wait (Gmail, Slack, and others) with the values in the message, then do the action only on approve. Verified end to end with Gmail send-and-wait.
- While the sub-workflow waits, the Agent suspends. The chat shows "Waiting on {workflow}" with Check for the result and Stop waiting;
call_agentreturnsapproval_requiredwithsuspensions[]. When the execution finishes, the Agent resumes with its output. - Return an explicit result from both branches (
approvedordenied, plus what happened), so the Agent can report it. Check the field mapping on the approval response: a wrong mapping drops into the not-approved or timeout branch and the Agent reports that instead. - Don't also set
requireApprovalon this tool, or the user approves twice. - Approve in the same Slack thread. For an Agent on Slack, give the tool
aiinputs for the channel and thread ts, and have the send-and-wait node post into that thread. The approval then appears in the conversation, with the values. The model supplies these ids, so tell it to take them fromget_current_message_context, not the message text. When approvals must go to one place (a finance channel), make the channel afixedinput so the model can't redirect it. - Expect it to fail under Message an Agent like any other suspension.
Open this reference as its own page
Channels
A channel makes the Agent something people talk to on a platform. If the Agent only needs to call a service (post a report to Slack, file a Linear issue), that's a node tool, not a channel. discover_agent_assets kind=integrations lists what this instance offers, each with useIntegrationWhen, useNodeToolWhen, approvableActions, and a settings schema.
Native channel or shell workflow?
| Native channel | Shell workflow + Message an Agent |
|---|---|
| Nothing to build; mentions, threads, DMs, and replies handled | Full control of routing, slash commands, buttons, and formatting |
Approvals built in (no parameters on the card; for values, a send-and-wait workflow tool in the same thread, APPROVALS.md) |
Custom approval with send-and-wait in the shell |
The Agent can post on its own (<channel>_action tools, tasks) |
Exact values from the event can be mapped deterministically around the call |
| Sessions per platform thread, only reachable from that thread | Session keys reachable from any workflow in the project |
| Slack, Telegram, Discord, Linear, n8n Chat | Any platform with an n8n trigger (Teams, WhatsApp, email, webhooks) |
Default to native. Pick the shell when one of the right-hand rows is a requirement. Shell patterns: n8n-ai-nodes-official references/CHAT_SURFACE_PATTERNS.md.
Rules for every channel
- Channels always run the published version. Test in Preview first.
- Channels aren't versioned. On an unpublished Agent a configured channel stays inactive until
publish_agent. On a published Agent, connecting goes live immediately, so confirm with the user first. - Manage them with
update_agent_integration(Discord may need the UI, below) (action: connectordisconnect,type,credentialId,settings).replacesCredentialIdswaps a credential in one call. - The Agent answers new @mentions and DMs, then follows the rest of that thread without needing another mention.
/newstarts a fresh session. An idle timeout ("New session after inactivity",sessionIdleTimeoutMinuteswhere the settings schema has it) does it automatically.- Each channel adds
<type>_contextand<type>_actiontools, so instructions can say "DM the requester when done" and tasks can post proactively.
Slack
A Slack app sends events only to the request URL in its own config. A slackApi credential made for a Slack Trigger or another Agent passes every check and the Agent receives nothing. Use managed setup:
update_agent_integrationconnect,type: slack, nocredentialId.status: workspace_selection_required: listsmanagerCredentialswith workspaces. Ask which workspace, and confirm n8n may create a Slack app there.slack_workspace_not_connectedorslack_manager_reconnect_required: give the useragentUrlto connect or reconnect the workspace once through Add channel, then retry.slack_managed_setup_unavailable: relayslackApp.requestUrlandslackApp.manifestso the user creates the app, then connect with that app'sslackApicredential.
- Call again with
managerCredentialIdandworkspaceId.install_approval_requiredmeans the user approves the install atinstallUrl. Thenget_agentto confirm.
With an explicit credential, check slackApp.configuredForAgent in the result; if false, relay the warning and request URL instead of reporting the channel ready.
Approval cards in a channel can be clicked by anyone who can see them.
Telegram
Settings are required: { "accessMode": "private", "allowedUsers": ["@alice", "123456"] } or { "accessMode": "public", "allowedUsers": [] }. Public means any Telegram user can talk to it, and spend your budget. Default to private. Optional sessionIdleTimeoutMinutes.
Discord and Linear
<!-- TEMPORARY: update_agent_integration's description names only Slack, Telegram, and Linear, though discover_agent_assets lists Discord. Revisit once Discord connect over MCP is confirmed. -->- Discord: mentions and DMs, replies in channels, threads, and DMs, embeds with buttons. Credential type
discordBotApi. If connecting it throughupdate_agent_integrationfails, the user adds it in the Agent's UI. - Linear: issue and comment events, replies in the Linear conversation, issue and comment actions. Credential type
linearOAuth2Api. For "file tickets in Linear" without people talking to the Agent in Linear, use a Linear node tool instead.
n8n Chat
n8n's own chat UI, where instance users pick an Agent and talk to it. Rolling out behind a flag, so it may not be on the instance. Users are n8n users, and episodic memory is per n8n user.
Open this reference as its own page
Agent config JSON
get_agent_builder_reference returns the live configSchema. When it disagrees with this file, the schema wins.
A minimal runnable Agent
Validated and run live:
{
"model": "openai/gpt-4.1-mini",
"credential": "<openAiApi credential id>",
"instructions": "You are ...",
"memory": { "enabled": true, "storage": "n8n" },
"tools": [
{
"type": "workflow",
"workflow": "Record note",
"workflowId": "<workflow id>",
"name": "record_note",
"description": "Record a note for a customer. Use when the user asks to log or remember something about a customer.",
"requireApproval": true,
"inputs": {
"customerId": { "mode": "ai", "description": "Customer id, e.g. C-123" },
"note": { "mode": "ai" },
"source": { "mode": "fixed", "value": "agent" }
}
}
]
}
name, model, credential, and instructions are what make it runnable. create_agent injects name from its top-level argument.
Fields
| Field | Notes |
|---|---|
model |
provider/model-id, e.g. openai/gpt-4.1-mini. List with discover_agent_assets kind=models provider=... |
credential |
Credential id for that provider. modelDeploymentName for Azure-style deployments |
instructions |
The system prompt. Required, non-empty |
description |
Max 512 chars. Shown in Agent lists |
memory |
See MEMORY.md. Omit it and the Agent is stateless |
tools |
Node, workflow, and custom tool references. See TOOLS.md |
skills, tasks |
References only; bodies are managed with mutate_agent |
subAgents |
agents[] (agentId, useWhen, enabled), maxChildren (1 to 20, default 10), modelsByDifficulty. See SUB_AGENTS.md |
mcpServers |
Up to 20 external MCP servers. See TOOLS.md |
vectorStores |
Up to 20 Pinecone, Qdrant, Supabase, or Postgres stores. See KNOWLEDGE.md |
providerTools |
Provider-native tools, keyed by provider |
personalisation |
icon and gradient, cosmetic |
config.reasoning |
low, medium, high, for reasoning models |
config.promptCaching |
{ enabled, anthropic: { ttl: "5m" or "1h" } } |
config.webSearch |
{ enabled, provider: auto, native, brave, or searxng, credential } |
config.toolCallConcurrency |
1 to 100. Default 1: tool calls run one at a time |
config.maxIterations |
1 to 200. Leave unset unless the user asks. Hitting it ends the run and the session shows as an error |
config.guardrails.budget |
{ enabled, monthlyBudgetUsd, alertThresholdPercent, sessionCostCapUsd }. An alert threshold needs a monthly budget. A session that hits its cap stops |
Channels (integrations) aren't part of editable config. get_agent shows them read-only; change them with update_agent_integration.
Draft, published, and what isn't versioned
- Every edit changes the draft.
publish_agentsnapshots it as the published version, which channels, tasks, and production workflow calls run. - Preview,
call_agent, task "Run now", and Message an Agent in manual or chat-trigger test runs use the draft.<!-- TEMPORARY: knowledge files and channel connections aren't versioned with the Agent; revisit if they become part of the published snapshot. --> - Not versioned: knowledge files and channel connections. Adding a file or a channel to a published Agent takes effect at once, with no republish and no rollback.
Open this reference as its own page
Knowledge files and vector stores
Two different things, often confused.
| Knowledge files | Vector stores | |
|---|---|---|
| What | Files uploaded to the Agent in the UI (Knowledge tab) | An external index you already fill elsewhere: Pinecone, Qdrant, Supabase, Postgres (pgvector) |
| How the Agent reads them | Not RAG. Grep-style tools in a sandbox: find_file (by name), search_text (regex over contents), read_file |
Semantic search tool search_<name>, top 4 results per call |
| Good for | Policies, handbooks, price lists, FAQs, CSVs: text the model can search for exact words | Large corpora where wording varies and exact-match search misses |
| Set up | UI upload; not through MCP | vectorStores[] in config |
| Versioned | No. An upload changes the live Agent at once | Config is versioned; the index isn't |
Knowledge files
- Types:
.csv,.md,.markdown,.pdf(with a text layer; scanned images have nothing to search),.txt. - Limits: 10 MB per file, 10 files per upload, 1.5 GB per Agent.
- Because search is exact text, tell the Agent in
instructionswhat the files are and to search before answering ("Policies are in the knowledge files; search them before answering any policy question and quote the section"). File names matter:find_fileworks on them. - Only top-level Agents with the sandbox on get these tools.
Vector stores
"vectorStores": [ {
"provider": "pinecone", "name": "product_docs",
"credential": "<pinecone credential id>", "indexName": "docs", "namespace": "v2",
"embedding": { "model": "openai/text-embedding-3-small", "credential": "<id>" },
"useWhen": "Search when the user asks how a product feature works."
} ]
name(letters, digits,_,-) becomes the toolsearch_<name>.useWhenis its description.- Provider-specific fields: Pinecone
indexName(+namespace), QdrantcollectionName, SupabasetableName(+queryName), PostgrestableName. - Search only: the Agent can't write to the store. Fill it with a workflow (vector store nodes).
- The
embeddingmodel must match the one used to fill the index.
Before relying on a store filled by n8n's own vector store nodes, run one call_agent query and check the answer cites real content.
Open this reference as its own page
Agent MCP tools in depth
Access
availableInMCP. Every tool exceptsearch_agentsrefuses an Agent that isn't available in MCP: "Agent is not available in MCP. Enable MCP access from the agents list, or from the MCP settings page." Agents created through MCP get it automatically. For one built in the UI, ask the user to open the Agents list, then the Agent's menu, then Enable MCP access.- Scopes. Reading needs
agent:read, editing needsagent:write, andcall_agentneedsagent:execute. A missing scope returns "You do not have permission to access agents in this project." - Tools register only when the MCP builder is on and the Agents module is active and enabled.
The tools
| Tool | Notes |
|---|---|
get_agent_builder_reference |
The guide plus the live configSchema. Read once per session |
discover_agent_assets |
kind: models (pass provider, optionally credentialId and query, to list a provider's models with prices and limits), integrations (channels, their capabilities, and settings schemas), workflows (attachable as tools), subagents (same-project Agents), mcpServers (registry entries) |
search_agents / get_agent |
get_agent returns config, configHash, isRunnable, missing, skill bodies with skillHashes, tasks, customTools, and read-only integrations. Pass versionId to read a published snapshot |
create_agent |
projectId, name, optional initial config (no skills, tasks, custom tools, or integrations) |
mutate_agent |
One operation per call, below |
validate_agent |
Returns valid, errors, missing, and the editor url. A missing published workflow shows up in missing |
verify_agent_mcp_server |
Opens a real connection and returns the server's tools. validate_agent never does this |
call_agent |
Tests the draft through Preview. Results: completed, suspended with approvals[] (each with a continuation), or approval_required with suspensions[] when a workflow tool is waiting |
publish_agent / unpublish_agent |
Publish activates tasks and channels. publish_agent with versionId republishes an older version |
list_agent_versions / revert_agent |
Revert copies a published version into the draft without publishing |
update_agent_integration |
The only way to change channels. See CHANNELS.md |
delete_agent |
Permanent. Confirm first |
In publish, unpublish, and revert responses, activeVersionId is the live version (null when unpublished). versionId is the draft's internal pointer; don't report it as a published version.
mutate_agent operations
Every call takes top-level agentId, baseConfigHash (the latest configHash), and one operation. Fields sit directly on the operation object, with no value wrapper.
| Operation | Fields | Notes |
|---|---|---|
config.replace |
config |
Complete editable config. No integrations |
config.patch |
patch (RFC 6902) |
Paths under /integrations are rejected. Use add with /tools/- to append |
skill.upsert |
skill (name, description, instructions, optional references[]), optional skillId + baseSkillHash |
Omit skillId to create and attach. A duplicate name returns skill_name_taken. Doesn't change configHash |
skill.delete |
skillId |
Detaches and removes the reference |
task.upsert |
task (name, objective, cronExpression, optional timezone), optional taskId, enabled |
See TASKS.md |
task.delete |
taskId |
|
customTool.upsert |
code |
TypeScript with only @n8n/agents and zod imports. See TOOLS.md |
customTool.delete |
toolId |
Example patch (verified live):
{ "type": "config.patch", "patch": [
{ "op": "add", "path": "/memory", "value": { "enabled": true, "storage": "n8n" } },
{ "op": "replace", "path": "/tools/0/requireApproval", "value": true }
] }
Error codes
| Code or message | Meaning | Fix |
|---|---|---|
stale_config |
baseConfigHash is old |
get_agent, reapply against the new snapshot |
skill_name_taken |
Another skill on the Agent has that name | Rename, or upsert with its skillId |
slack_app_built_for_another_agent |
The bot credential belongs to another Agent's Slack app | Disconnect it, then install again |
agent_misconfigured (from call_agent) |
Draft isn't runnable | get_agent, read missing |
missing: tools.N.workflowId (... is not published ...) |
Workflow tool not published | publish_workflow, with the user's OK |
Guards worth knowing
- Credentials must be ones the caller can access;
list_credentialsgives ids. Never put secrets in config. - Empty instructions are rejected.
$fromAIis rejected in dynamic option fields (resource locators, load-options) of node tools; set those to real values fromexplore_node_resources.- Conversation runs aren't workflow executions.
get_workflow_executioncovers only workflows the Agent called as tools.
Open this reference as its own page
Memory and sessions
Turn it on
"memory": { "enabled": true, "storage": "n8n" }. The UI writes this on every save; create_agent doesn't. Without it, verified live: told "my favorite color is teal", then asked in the same session, the Agent said it had never been told.
That block gives three things:
| Kind | Scope | What it does | Config |
|---|---|---|---|
| Conversation history | One session (thread) | The turns so far | On with the block |
| Observational memory | One session | Compresses long sessions into running observations so they fit the context | On unless observationalMemory.enabled: false. Optional observerModel, reflectorModel, token thresholds |
| Episodic memory | Across sessions, per memory owner (below) | The Agent flags facts worth keeping and recalls them in later sessions | Off unless episodicMemory: { "enabled": true, "credential": "managed" } or an embedding credential id. topK, maxEntriesPerRun |
Sessions also get an auto-generated title (the names in the Sessions list).
Who shares what
| Caller | Session (thread id) | Memory owner (episodic scope) |
|---|---|---|
Preview, call_agent |
Per test conversation | The builder user (draft chat) |
| n8n Chat | Per conversation | The n8n user |
| Slack, Telegram, Discord, Linear | <agentId>:<platform thread>, e.g. <agentId>:chat:8902230296-telegram:8955744864#1 |
The platform user |
| Scheduled task | Per run | The task |
| Message an Agent | workflow:project-<projectId>:<sessionKey> |
The session itself |
Consequences:
- Message an Agent keys are project-wide, not per Agent. The session id has no Agent in it, so a key belongs to whichever Agent used it first. Any workflow that calls that same Agent with the key continues the session (verified live across two workflows). Calling a different Agent with that key fails with "Failed to create the agent execution record" (verified live). So a bare Telegram user id works as the key for one Agent only; prefix it per Agent (
support-<telegramId>,billing-<telegramId>). Max 74 characters.<!-- TEMPORARY: sessions can't be shared between native channel conversations (Slack, Telegram, Discord, Linear, n8n Chat) and Message an Agent calls from workflows. Revisit if n8n adds a way to key into a native session from a workflow, or vice versa. --> - Channel sessions and workflow sessions never meet. A Slack thread with the Agent and a Message an Agent call keyed on that thread's
tsare two separate conversations with separate memory, even for the same Agent. When one conversation must span a chat platform and workflows, skip the native channel: build a shell workflow on the platform's trigger and call the Agent with Message an Agent (n8n-ai-nodes-officialreferences/CHAT_SURFACE_PATTERNS.md). - Episodic memory on channels is per platform user, so one person's facts follow them across threads but not to other people.
- On channels,
/newstarts a fresh session, and an optional idle timeout starts one automatically (CHANNELS.md). Each reset bumps a generation suffix on the thread id (#1,#2); the first session has none. - With no session key, each Message an Agent call is a one-off session.
What memory isn't
- Not a database. For records the Agent or other workflows must query (orders, preferences, tickets), give it a Data Table node tool.
- Not shared between Agents. A sub-agent starts clean; pass what it needs in the delegation
context.
Open this reference as its own page
Message an Agent
n8n-nodes-base.messageAnAgent (v3.1) calls a first-class Agent from a workflow and returns its answer as an item. Use it when a fixed pipeline needs the Agent's judgment, or as the core of a chat shell on a platform without a native channel. Its tool variant, n8n-nodes-base.messageAnAgentTool, lets an AI Agent node delegate to a first-class Agent.
The pattern: the Agent decides, the workflow acts. Ask for a structured decision, then let ordinary nodes do the exact, deterministic work with expressions (the part Agent tools can't do, TOOLS.md).
const triage = node({
type: 'n8n-nodes-base.messageAnAgent',
version: 3.1,
config: {
name: 'Triage ticket',
parameters: {
agentId: { __rl: true, mode: 'id', value: '<AGENT_ID>' },
message: '={{ "New ticket from " + $json.email + ":\\n" + $json.body }}',
useStructuredOutput: true,
schemaType: 'manual',
outputSchema: '{"type":"object","properties":{"action":{"type":"string","enum":["refund","reply","escalate"]},"reply":{"type":"string"}},"required":["action"]}',
advanced: {
session: { session: { sessionIdType: 'customKey', sessionKey: '={{ "triage-" + $json.ticketId }}' } },
},
},
},
})
// then: Switch on $json.structuredOutput.action, and the refund node reads $('Webhook').item.json.orderId directly
Parameters
| Parameter | Notes |
|---|---|
agentId |
Resource locator; mode: 'id' with the Agent id, or list |
message |
The user message. Anything the Agent needs from the event goes here (or via the fetch tools below) |
useStructuredOutput + schemaType (fromJson with jsonSchemaExample, or manual with outputSchema) |
The validated object lands in structuredOutput. Prefer manual with a real schema, same reasons as the AI nodes' output parser |
advanced.session.session.sessionIdType |
fromInput: sessionId from a directly connected Chat Trigger. customKey: your own sessionKey |
advanced.invokeMode |
allItems (default): one call for all input items. perItem: one call per item |
advanced.enableStreaming |
Default true |
advanced.allowOtherNodesData |
Adds a fetch_workflow_context tool so the Agent can read other nodes' output in this execution |
The Agent always gets fetch_input_data, which reads this node's input items (JMESPath query optional). Both fetch tools are the model's choice to call, so they're for context, not for exact values.
Output
Verified live:
{ "text": "...", "structuredOutput": null, "usage": { "promptTokens": 2626, "completionTokens": 13, "totalTokens": 2639 },
"toolCalls": [ { "toolName": "...", "input": {}, "result": {} } ], "finishReason": "stop",
"session": { "agentId": "...", "projectId": "...", "sessionId": "my-key", "threadId": "workflow:project-<projectId>:my-key" } }
session builds the trace link (SESSIONS_AND_DEBUGGING.md). The execution log in the UI also links to it.
Behavior to design around
All verified live unless marked.
- Draft or published: manual executions run the Agent's draft (chat-trigger test runs too; read from n8n source, not tested live); production executions run the published version, so publish the Agent before the workflow goes live.
- Session keys are project-wide, not per Agent. A key belongs to the first Agent that uses it. The same Agent with the same key from any workflow continues the session; a different Agent with that key fails with "Failed to create the agent execution record". So a bare user id (Telegram id, email) can key one Agent only: prefix per Agent (
support-<telegramId>,billing-<telegramId>). Max 74 characters. No key = a one-off session.<!-- TEMPORARY: sessions can't be shared between native channel conversations (Slack, Telegram, Discord, Linear, n8n Chat) and Message an Agent calls from workflows. Revisit if n8n adds a way to key into a native session from a workflow, or vice versa. --> - Never the same session as a native channel, even for the same Agent and the same platform thread (
MEMORY.md). - No approvals or waits. A tool with approval required fails the node: "Agent execution suspended waiting for tool approval. Suspend/resume is not supported in workflow execution context." A workflow tool that waits hits the same suspension (per source).
- The Agent needs a memory block for
sessionKeyto mean anything (MEMORY.md). - Put
onError: 'continueErrorOutput'on the node in anything user-facing, and handle the error branch (n8n-error-handling-official).
The node also has an inline mode where the Agent's config lives in the node itself: no draft or publish, no Sessions entry, and memory only when a session key is set. It's set from the node creator, not through MCP; build a saved Agent instead.
Open this reference as its own page
Sessions and debugging
<!-- TEMPORARY: the MCP has no tool to read Agent sessions. Revisit if one is added, then read traces directly instead of sending the user to the Sessions tab. -->You can't read Agent sessions over MCP. No tool lists sessions or reads a trace, and get_workflow_execution only covers workflows. Your job is to give the user a direct link and tell them what to look for.
What you can see, and what only the user can
| Source | You (MCP) | The user (UI) |
|---|---|---|
Your own call_agent test |
Reply, status, approvals, sessionId |
The session in the Sessions list |
| Workflow tools the Agent called | search_workflow_executions + get_workflow_execution; data.parentAgentRun has agentId, projectId, threadId, toolCallId |
Same, plus a link from the trace |
| A Message an Agent run | The node output's session block |
"View session" from the execution log |
| Channel, task, n8n Chat, and Preview sessions | Nothing | Agent → Sessions tab |
Linking straight to a session
https://<instance>/projects/<projectId>/agents/<agentId>/sessions/<threadId, URL-encoded>
Encode the thread id (# → %23, : can stay). Give this link whenever you have the ids: after call_agent (sessionId is the thread id), from a Message an Agent output (session.threadId), or from a tool execution's parentAgentRun.threadId. Otherwise point the user to the Agent's Sessions tab.
What the user sees
- Sessions list: title, status (Succeeded, Error, Canceled, Interrupted, Running), origin badge (Preview, n8n Assistant, MCP, Workflow, Schedule, Sub-agent, Slack, Telegram, Discord, Linear, n8n Chat), last activity, tokens. Auto refresh, and filters for status, origin, and last activity.
- Session trace: a header with origin, tokens, cost, and duration; a colored timeline strip; and the event list: User, Assistant, Tool, Skill, Memory updated, Approval request and response, Waiting on workflow, Sub-agent ("Open sub-agent session"), errors. Clicking an event opens its details: input, output, model, tokens, cost. Workflow tool events link to the execution.
- Error events: "Tool call failed", "Tool experienced an error", "Workflow call did not produce an execution", "Execution failed", "Execution interrupted", and the session cost cap message ("This session reached its cost cap before finishing").
"Send to LangSmith" on a session sends the conversation, tool inputs and outputs, and errors to n8n's LangSmith workspace for n8n's debugging. Don't suggest it as a user-side tracing tool.
Triage
| Symptom | Ask the user to check | Usual cause |
|---|---|---|
| Wrong answer, no tool called | Assistant event; Skill events | Tool or skill description doesn't match how the user asked; instructions forbid it |
| Tool called with wrong values | The Tool event's input | Vague parameter descriptions, or a value the model had to guess because tools can't read trigger data |
| Tool failed | Tool event output, then the linked execution | Credential, unpublished workflow, node error, MCP server unreachable |
| Stuck mid-run | "Approval requested" or "Waiting on workflow" with nothing after | Nobody answered the approval (a task, a channel nobody watches) |
| Approval workflow reports timed out or denied after the user approved | The linked execution's branch | Wrong mapping of the send-and-wait response sends it down the wrong branch |
| Forgot earlier turns | Origin and thread id of both sessions | No memory block; a different session (/new, idle timeout, a different key, channel vs workflow) |
| Stopped early | Last error event; header cost | Session cost cap, monthly budget, or maxIterations (shows as an error) |
| Sub-agent "didn't run" in production | Sub-agent event result | Child not published |
| Works in Preview, not in Slack | Which version each ran | Channels run the published version; the fix is only in the draft |
When a test exposes a problem, report it and ask before changing the Agent.
Open this reference as its own page
Agent skills
An Agent skill is a named set of instructions the Agent loads only when it needs them. Use one for a procedure that matters for some requests but would waste tokens on every turn if it lived in instructions (a refund policy, a report format, a triage playbook).
How loading works
- Each skill's
nameanddescriptionsit in the system prompt as a catalog. The body doesn't. - The model calls the built-in
load_skillwhen a request matches a description. The body then stays in context for the rest of the conversation, so a loaded skill costs tokens on every later turn. - References load separately:
load_skillwith the skill and afilePath. Say so explicitly in the body. In a live test, "read references/signoff.md" was ignored; "load the linked file references/signoff.md with load_skill (filePath)" worked.
So the description is the trigger. Write it like this skill pack's descriptions: "Use when ...", with the words a user would actually type.
Creating one
{ "type": "skill.upsert", "skill": {
"name": "Refund policy",
"description": "Use when the user asks for a refund, a return, or money back.",
"instructions": "1. Check the order date with get_order.\n2. ...\nBefore quoting limits, load references/limits.md with load_skill (filePath).",
"references": [ { "path": "references/limits.md", "content": "..." } ]
} }
| Field | Limit |
|---|---|
name |
128 chars, unique per Agent (skill_name_taken otherwise) |
description |
512 chars |
instructions |
64 KB |
references |
Up to 20 Markdown files, 64 KB each |
- To edit, pass
skillIdandbaseSkillHashfromget_agentskillHashes, so you don't overwrite an edit made elsewhere.skill.upsertdoesn't changeconfigHash. allowedToolsis accepted but doesn't restrict anything at runtime. Put tool rules in the body.- Skills can't carry scripts, assets, or templates; only Markdown.
Some instances have a Skills Hub for sharing skills across Agents and importing SKILL.md folders. Import takes SKILL.md plus references/*.md and refuses a scripts/ folder. Over MCP, skills are always per Agent.
Skill, instructions, or sub-agent?
| Put it in | When |
|---|---|
instructions |
Needed on nearly every turn: persona, safety, output format |
| A skill | A procedure for some requests, using the Agent's own tools |
| A sub-agent | Work that needs different tools, a different model, or a clean context (SUB_AGENTS.md) |
Open this reference as its own page
Sub-agents and model routing
Every top-level Agent has the built-in delegate_subagent tool. A call looks like this (from a live run):
{ "subAgentId": "<agent id>", "taskName": "Reply with agent name and OK",
"goal": "...", "context": "", "expectedOutput": "...", "difficulty": "low" }
The child starts clean: it sees goal, context, and expectedOutput, not the parent's conversation. Tell the parent (in useWhen or instructions) to pass everything the child needs in context.
Saved vs inline
| Saved sub-agent | Inline (no subAgentId) |
|
|---|---|---|
| What runs | Another Agent in the same project, with its own instructions, tools, and model | A copy of the parent |
| Configure | subAgents.agents[]: { "agentId", "useWhen" } |
Nothing; always available |
| Model | The child's own | subAgents.modelsByDifficulty by the difficulty the parent picks, else the parent's model |
| Use for | A specialist with tools or a model the parent shouldn't carry | Parallel or long subtasks that need a clean context |
useWhen (max 512 chars) is how the parent decides to delegate, like a tool description. Make it specific: "Delegate any question about invoices, refunds, or billing history" beats "billing stuff".
Rules
- Publish saved children before the parent goes live. Preview runs the child's draft, so tests pass.
validate_agentandpublish_agentdon't check the child. In production the call fails with "Sub-agent ... is not published. Publish it before delegating to it in a production run.", and the parent answers without it (verified live). - One level deep. A sub-agent can't delegate further.
- Parallel limit:
subAgents.maxChildren, 1 to 20, default 10. - The child's run shows in the parent's trace as a Sub-agent event with "Open sub-agent session", and in the Sessions list with origin Sub-agent.
Model routing
<!-- TEMPORARY: model routing is manual and only covers inline delegation. Revisit if n8n adds automatic routing or routing for saved sub-agents. -->There's no automatic routing. modelsByDifficulty maps low, medium, and high to { model, credential } for inline delegations only, and the parent picks the difficulty per call. Missing levels fall back to the parent's model. A typical setup: a strong parent model, with low mapped to a cheap fast model for lookups and formatting.
"subAgents": {
"modelsByDifficulty": {
"low": { "model": "openai/gpt-4.1-mini", "credential": "<id>" },
"high": { "model": "<provider/strong-model>", "credential": "<id>" }
}
}
List models and prices with discover_agent_assets kind=models provider=<provider> credentialId=<id>.
Open this reference as its own page
Scheduled tasks
A task runs the Agent on a cron schedule with a written objective, for work it should do on its own (morning digest, weekly cleanup, checking a queue).
{ "type": "task.upsert", "enabled": true, "task": {
"name": "Morning digest",
"objective": "Summarize yesterday's new support tickets by theme and post the summary in Slack #support-leads. If there were none, post nothing.",
"cronExpression": "0 9 * * 1-5",
"timezone": "America/New_York"
} }
cronExpression: standard five fields.objective: up to 10,000 chars.- Set
timezoneexplicitly. Omitted over MCP, it's stored asnulland runs in the instance timezone (verified live). Tasks created in the UI default to the browser's timezone instead, so the same cron can fire at different hours depending on how it was made. On a replace, an omittedtimezonekeeps the old one; sendnullto reset to the instance timezone. enabledon the operation turns the task on or off without deleting it.
How a task run behaves
- Scheduled runs use the published version. A task added to the draft does nothing until
publish_agent. "Run now" in the UI runs the draft. - There's no one to reply to. The objective must say where results go ("post in #ops", "DM @alice"), which needs a channel or a node tool that can deliver. A task that only "summarizes" produces a summary nobody sees.
- There's no one to approve. A tool with approval required makes the run wait for an answer that never comes. Give scheduled work only tools that are safe without approval.
- Each run is its own session with origin Schedule in the Sessions list, and episodic memory scoped to the task.
- Say what to do when there's nothing to do; otherwise it may post "nothing to report" every morning.
Open this reference as its own page
Agent tools
Tool names and descriptions are part of the prompt, same as for the AI Agent node: verb-first names (record_note, not tool1) and descriptions that say what it does, when to use it, and what each input means. Pick the lightest type that covers the job.
| Type | Use for |
|---|---|
| Node tool | One operation of an existing n8n node (send a Slack message, query a Data Table, HTTP request) |
| Workflow tool | Anything multi-step, branching, or reused. The most capable option |
| MCP server | A whole external tool catalog (GitHub, Linear, an internal MCP) |
| Custom tool | Small pure logic (formatting, math) with no credentials or I/O |
| Channel | The Agent is talked to on that platform. Not a tool; see CHANNELS.md |
Node tools
{
"type": "node",
"name": "echo_http",
"description": "Echo a search term through an HTTP test endpoint. Use when asked to echo.",
"node": {
"nodeType": "n8n-nodes-base.httpRequestTool",
"nodeTypeVersion": 4.5,
"nodeParameters": {
"method": "GET",
"url": "https://httpbin.org/get",
"sendQuery": true,
"queryParameters": { "parameters": [
{ "name": "q", "value": "={{ $fromAI('q', 'The search term to echo', 'string') }}" }
] }
},
"credentials": {}
}
}
- Discover nodes with
search_nodesusage: "agentTool", thenget_node_types. Credentials are{ "<credentialType>": { "id", "name" } }. - Model-filled values use
$fromAI('key', 'description', 'type'). Everything else is fixed. - Resource locators and dropdowns (channel, sheet, table) take real values from
explore_node_resources;$fromAIthere is rejected. - Write the
descriptionin JSON. A tool without one gets the generic "Execute node ..." text and is picked badly.
Workflow tools
{
"type": "workflow", "workflow": "Record note", "workflowId": "<id>",
"name": "record_note", "description": "...", "requireApproval": false,
"inputs": {
"customerId": { "mode": "ai", "description": "Customer id, e.g. C-123" },
"source": { "mode": "fixed", "value": "agent" },
"receivedVia": { "mode": "expression", "value": "={{ $now.toISO() }}" }
}
}
- The workflow must start with When Executed by Another Workflow (
n8n-nodes-base.executeWorkflowTrigger) using Define Below inputs, live in the same project, and be published.validate_agentlists an unpublished one undermissing. inputskeys are the trigger's input names. Missing keys default toai.fixedandexpressioninputs are hidden from the model.allOutputs: truereturns every node's output instead of the last node's.- The sub-execution is a normal workflow execution (readable with
get_workflow_execution). ItsparentAgentRuncarriesagentId,projectId, andthreadId, which build the session link. - A workflow tool that waits (Wait node, send-and-wait) suspends the Agent until the execution finishes, then returns its output. This is how custom approval works; see
APPROVALS.md.
What expressions can see
<!-- TEMPORARY: revisit when Agent tools can read run context (trigger or upstream node data) in expressions. -->In both node tools and workflow-tool expression inputs, $json is the model's arguments for that call and nothing else (verified live: {{ JSON.stringify($json) }} returned only {"q":"walrus"}). There's no trigger, no $('Node'), and no data from a calling workflow. Static expressions ($now, $execution.mode) work. To get exact values from an event into a tool, keep that mapping in a workflow (MESSAGE_AN_AGENT.md) or use the AI Agent node.
MCP servers
{
"name": "github", "url": "https://api.githubcopilot.com/mcp/",
"transport": "streamableHttp", "authentication": "githubOAuth2Api",
"credential": "<id>", "metadata": { "nodeTypeName": "@n8n/mcp-registry.gitHub" },
"toolFilter": { "mode": "allow", "tools": ["search_issues", "get_issue"] },
"approval": { "mode": "selected", "tools": ["create_issue"] }
}
- Find registry servers with
discover_agent_assets kind=mcpServers; copymetadatafrom the result, don't invent it. - Call
verify_agent_mcp_serverwith the same fields before saving, and buildtoolFilterfrom the tools it returns.validate_agentnever connects, so an unverified server can pass validation and fail at runtime (the run continues without its tools and warns). - Credentials can't be created through MCP. If none exists, ask the user to create one.<!-- TEMPORARY: newer n8n replaces mcpServers[].approval with toolPermissions (read/write categories). Update this block when the live configSchema changes. -->
approval:{ "mode": "global" }for every tool, orselectedwith a list. Absent means no approval.
Custom tools
import { Tool } from '@n8n/agents';
import { z } from 'zod';
export default new Tool('get_current_datetime')
.description('Return the current date and time as an ISO 8601 string')
.input(z.object({}))
.handler(async () => new Date().toISOString());
Created with mutate_agent customTool.upsert (code), which also attaches it as { "type": "custom", "id": "get_current_datetime" } (the id is the Tool name). Only @n8n/agents and zod import. Runs in a sandbox: no credentials, so anything that calls an authenticated API belongs in a node or workflow tool.
Built-in tools
The runtime adds these; don't recreate them.
| Tool | What it does |
|---|---|
get_environment |
Current date, time, instance timezone, weekday |
load_skill |
Loads a skill body or one of its reference files (SKILLS.md) |
delegate_subagent |
Delegates to a saved or inline sub-agent (SUB_AGENTS.md) |
write_todos |
The Agent's own task list for long runs |
mark_session_failed |
The Agent gives up with a reason; the session shows as an error |
find_file, search_text, read_file |
Knowledge files, when uploaded (KNOWLEDGE.md) |
search_<name> |
One per vector store (KNOWLEDGE.md) |
<channel>_context, <channel>_action |
Per connected channel, e.g. slack_action to DM or post |
More in this playbook
Safe to turn on
Use this skill when an agent or person is about to create, change or enable an automation inside someone else's account or a shared environment: "create this workflow", "build it in the customer's account", "turn it on", "go live", "deploy this automation". Produces a proposal the human approves, an automation created in the off state, and a short list of what only the human can finish.
Workflow buildingMITn8n agents
Design n8n AI agents the right way. Use when building or editing any @n8n/n8n-nodes-langchain.* AI node — an AI Agent, LLM chain, Text Classifier, or Information Extractor — and whenever the user mentions AI agents, LLM with tools, tool calling, $fromAI, system prompts, agent memory, sessionId, structured/JSON output, output parser, RAG, vector store, a chat assistant/bot, or human-in-the-loop review. Covers Agent-vs-chain-vs-classifier choice, the model/memory/tools/outputParser slots, tool names/descriptions as prompt, structured output with autoFix, memory, RAG, human review, and chat topologies.
Workflow buildingMITn8n agents
Design n8n AI agents the right way. Use when building or editing any @n8n/n8n-nodes-langchain.* AI node — an AI Agent, LLM chain, Text Classifier, or Information Extractor — and whenever the user mentions AI agents, LLM with tools, tool calling, $fromAI, system prompts, agent memory, sessionId, structured/JSON output, output parser, RAG, vector store, a chat assistant/bot, or human-in-the-loop review. Covers Agent-vs-chain-vs-classifier choice, the model/memory/tools/outputParser slots, tool names/descriptions as prompt, structured output with autoFix, memory, RAG, human review, and chat topologies.


