# AI Agent node

A built-in node (built on LangChain) that runs an agent with a model and tools, right on the canvas.

AI developers · Part 08: n8n · Card 9 of 13 · Last updated 2026-10-13

## Analogy

A no-code agent loop. Great for prototypes, harder to test and version than code.

## In an agent

Fine for simple agents. For complex logic, tests and version control, keep the agent in code.

## Questions people ask

### What is the n8n AI Agent node?

It is a built-in node, built on LangChain, that runs an agent loop on the canvas: you choose a model, attach tools and memory, and it decides which tools to call. It is a quick way to prototype an agent without writing code, with the run visible in n8n.

### Should I build my agent in the n8n AI Agent node or in code?

Use the node for simple agents and prototypes. Move to code once the logic gets complex, or once you need tests, evals, version control and careful error handling. A common setup keeps the agent in code behind an API and lets n8n handle the triggers and integrations.

## Related concepts

- [n8n](https://studyvisually.com/learn/tech/ai-developers/n8n/n8n)
- [Trigger node](https://studyvisually.com/learn/tech/ai-developers/n8n/trigger-node)
- [Action node](https://studyvisually.com/learn/tech/ai-developers/n8n/action-node)
- [$json](https://studyvisually.com/learn/tech/ai-developers/n8n/json-item)

Web page: https://studyvisually.com/learn/tech/ai-developers/n8n/ai-agent-node
Study this card in the app: https://studyvisually.com/app/learn?category=ai-developers&card=ai-agent-node
