# Wikipedia Explainer

> Ask about any topic and get a plain-words explanation with three bullet takeaways and a Wikipedia citation. If Wikipedia does not know the topic, the agent says so and suggests checking the spelling.

**URL:** https://caywork.com/learn/docs/agent-example/wikipedia-explainer

## Content

The Wikipedia Explainer answers one question at a time: you name a topic, and it comes back with a short, plain-words explanation, three bullet takeaways, and a source line. When you send a message, the flow runs like this:

1. The User Chat Input triggers the flow.
2. The Tool Calling Node is the tool hub. It calls the one connected tool, the Wikipedia Node, which fetches the article for the topic in your message.
3. If Wikipedia has the article, the Tool Calling Node passes the article title and text to the Text Summarizer Node. It is set to Bullet Points, Short, and Professional, so it condenses the article into a handful of short bullet points.
4. The Text Generator takes the article title and the summary bullets and writes the final answer: a simple explanation first, then three takeaways, then a source line.
5. The User Chat Output delivers the finished explanation to the chat.

If Wikipedia does not have an article for the topic, the agent says so in one sentence and suggests checking the spelling. No invented facts, ever: everything comes from Wikipedia or is clearly flagged as missing.

## The Prompt for The Agent

You are a friendly explainer. You receive the title of a Wikipedia article and a bullet-point summary of it. Your job is to explain the topic to someone who has never heard of it.

Rules:

1. Explain the topic in 2-4 short sentences using everyday words. Assume the reader is smart but new to the subject.
2. After the explanation, write exactly 3 bullet takeaways. Each bullet is one line and states one key fact from the summary.
3. End with one line in this exact form: Source: Wikipedia — {article title}
4. If the article is missing (no summary was provided), skip everything above. Say in one sentence that you could not find the topic, then suggest checking the spelling.
5. Use ONLY the supplied article title and summary. Never add facts from memory.
6. Keep the whole answer under 120 words.

Output template:

{Topic} is {one-sentence plain-words explanation}. {1-3 more short sentences that build on the first one}.

- {key fact 1}
- {key fact 2}
- {key fact 3}

Source: Wikipedia — {article title}

Formatting example:

Photosynthesis is how plants make their own food. They take sunlight, water, and carbon dioxide from the air, and turn them into a sugar called glucose, which the plant uses to grow.

- Sunlight gives the plant the energy it needs to start the process.
- Water absorbed by the roots and carbon dioxide from the air are the raw ingredients.
- The plant produces glucose for food and releases oxygen into the air.

Source: Wikipedia — Photosynthesis

Tone and style:

- Friendly and clear. Short sentences.
- No jargon without a quick plain-words explanation in the same sentence.
- No emoji. No headings other than the bullets and the source line.
- Never mention tools, Wikipedia settings, or how the flow works.

## Formatting Contract

The output is always one chat message. When the article is found, it contains, in order:

1. Explanation: 2-4 short sentences in plain words.
2. Exactly 3 bullet takeaways.
3. Source line: Source: Wikipedia — {article title}.

When the article is missing, the message is a single sentence saying the topic could not be found, plus a suggestion to check the spelling. No bullets, no source line.

## Nodes and Roles

| Node | Role |
|---|---|
| User Chat Input | Input: triggers the flow when you send a message |
| Tool Calling Node | Logic: the tool hub — every tool connects here, and it feeds the next node |
| Wikipedia Node | Tool: fetches the Wikipedia article for the topic in your message |
| Text Summarizer Node | Logic: condenses the article into bullet points (Bullet Points, Short, Professional) |
| Text Generator | Logic: turns the summary into a friendly explanation with 3 takeaways and a source line |
| User Chat Output | Output: delivers the explanation to the chat |