All challenges

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.

BeginnerComplexity:Time: 15–25 min

Your task

Create a chat workflow with AI AgentThe node that reads your question, chooses a tool, and writes the answer. and connect WikipediaThe agent’s tool for looking up information in the online encyclopedia. as its tool. Ask a question such as “Tell me the history of Berlin.” The agent should look up WikipediaThe agent’s tool for looking up information in the online encyclopedia. and reply with a short, useful answer based on what it finds.

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.

What the workflow must do

  1. 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.

  2. 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.

  3. 03

    Bonus: the Berlin follow-up works in the same chat, while a new chat does not inherit the previous conversation.

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.

Solution

Reveal the workflow solution?

This will show the completed workflow for this challenge. Are you sure you want to continue?

Mentor review

Find a mentor and ask them to review.

Show them your working workflow. Once they approve it, collect the balloon for this challenge.