Your task
Challenge 12
Your First AI Agent
Build an AI AgentThe node that reads your question, chooses a tool, and writes the answer. that looks up WikipediaThe agent’s tool for looking up information in the online encyclopedia. to answer your questions.
Your bonus task
Connect Simple MemoryA node that keeps recent messages from the same chat so the agent can understand follow-up questions. so the agent remembers the conversation. Ask “Tell me the history of Berlin”, then “So when was it founded?” in the same chat. The agent should understand that “it” means Berlin without you repeating the city name.
Example use cases
- Explore the history of a city before a trip.
- Ask an assistant to explain a topic using WikipediaThe agent’s tool for looking up information in the online encyclopedia..
- Learn how adding memory lets an agent understand follow-up questions.
Before you start
- 01
Sign up for n8n Cloud or open your n8n workspace and create a new workflow.
- 02
Sign up for OpenRouter, create an API key, and save it in an n8n OpenRouter credential. Choose a model that supports tool calling; you can try the free models available to your account.
- 03
Wikipedia and Simple Memory need no separate account or API key. Use n8n’s built-in chat to test the workflow.
Nodes you'll use
What the workflow must do
- 01
A question sent in n8n chat receives a useful answer based on a WikipediaThe agent’s tool for looking up information in the online encyclopedia. lookup.
- 02
The execution shows that AI AgentThe node that reads your question, chooses a tool, and writes the answer. used the WikipediaThe agent’s tool for looking up information in the online encyclopedia. tool. If it cannot find an answer, it says so instead of inventing one.
- 03
Bonus: the Berlin follow-up works in the same chat, while a new chat does not inherit the previous conversation.
Tip
Need a tip?
Reveal up to five tips, one at a time.
Still stuck? Ask on the n8n community forum
Solution
See the workflow challenge answer
Reveal the completed workflow only when you are ready to compare it with your own.
Submit as solved
Ready to submit?
Submit when your team has a working workflow to demonstrate.