> For the complete documentation index, see [llms.txt](https://docs.n8n.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.n8n.io/build/integrate-ai/understand-ai-components.md).

# Understand AI components

Learn the core building blocks of AI workflows in n8n: chains, agents, memory, tools, and vector databases.

## In this section

* [What chains do](/build/integrate-ai/understand-ai-components/what-chains-do.md): understand chains in the context of AI.
* [What agents do](/build/integrate-ai/understand-ai-components/what-agents-do.md): understand how n8n provides agents.
* [How memory works](/build/integrate-ai/understand-ai-components/how-memory-works.md): understand memory in the context of AI.
* [How tools work](/build/integrate-ai/understand-ai-components/how-tools-work.md): understand tools in the context of AI.
* [Store and search data with vectors](/build/integrate-ai/understand-ai-components/store-and-search-data-with-vectors.md): understand vector databases, embeddings, and retrievers.
* [Retrieve relevant context](/build/integrate-ai/understand-ai-components/retrieve-relevant-context.md): use Retrieval-Augmented Generation (RAG) to give models access to context-specific resources.
* [Agents vs chains](/build/integrate-ai/understand-ai-components/agents-vs-chains.md): a workflow example demonstrating key differences between agents and chains.

## Related resources

* [Integrate AI](/build/integrate-ai.md)
* [MCP servers](/build/integrate-ai/mcp-servers.md)
* [LangChain in n8n](/build/integrate-ai/langchain-in-n8n.md)
* [Test and improve AI workflows](/build/integrate-ai/test-and-improve-ai-workflows.md)
* [AI examples](/build/integrate-ai/ai-examples.md)
