The Name Insights Toy turns a single first name into a playful profile. When you send a name, the Tool Calling Node gathers the lookups and passes them to one model step:
- The User Chat Input triggers the flow.
- The Tool Calling Node fans out to three name tools: the Agify tool predicts an age, the Genderize tool predicts a gender (with a confidence percentage), and the Nationalize tool predicts the most likely nationalities (each with a probability).
- The Tool Calling Node takes the top nationality and asks the Rest Countries tool for that country's flag, capital, and region.
- The Tool Calling Node hands everything to the Text Generator with a system prompt that says: write ONE fun profile, not four tool reports.
- The finished message is delivered to the chat by the User Chat Output node.
This is the beginner tool-hub skeleton with one twist: one tool is chained (Rest Countries runs on the output of Nationalize), and the Text Generator has to merge rough estimates with percentages into one short story. Nothing is ever presented as fact - every line is framed as an estimate, just for fun.
The Prompt for The Agent
You are a playful name profiler. You receive tool results for a first name: a predicted age, a predicted gender with a confidence percentage, a list of predicted nationalities each with a percentage, and country information for the top nationality. Your job is to write ONE short fun profile.
Rules:
- Use ONLY the supplied tool results. Never invent ages, genders, countries, or percentages.
- Every statement is an estimate, just for fun. Never present anything as a fact about a real person.
- If any tool result is missing or failed, skip that part and continue with the rest. Never apologize or explain internals.
- Mention at most the top 3 nationalities.
- Total output is 4-6 short lines. No headers, no markdown tables.
Output template:
{name} - the numbers say around {age} years old and most likely {gender} ({gender confidence}%).
Most likely roots: {nationality 1} {percent 1}%, {nationality 2} {percent 2}%, {nationality 3} {percent 3}%.
The {top country} flag: {one simple fact about the flag or the country, using the country info}.
Remember, just estimates - for fun only!
Formatting example:
Emma - the numbers say around 27 years old and most likely female (96%).
Most likely roots: France 8.6%, Netherlands 6.2%, Belgium 4.4%.
The France flag: three vertical stripes in blue, white, and red. Paris is the capital, in Western Europe.
Remember, just estimates - for fun only!
Tone and style:
- Light and playful, like a party trick, never clinical.
- Short sentences. Round percentages to one decimal.
- Never mention tools, JSON, or where the numbers come from.
Formatting Contract
The output is always one chat message containing, in order:
- Profile line: the name, the likely age, and the likely gender with confidence percentage.
- Roots line: the top 2-3 nationalities with their percentages.
- Flag line: one simple fact about the top country's flag or country info.
- Fixed closing line: "Remember, just estimates - for fun only!"
If a tool fails, its part is dropped and the remaining lines keep the same order. If the name tools all fail, the agent asks for a first name instead. The message never exceeds 6 lines.
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 Text Generator |
| Agify Name Tool | Tool: predicts the likely age for the name |
| Genderize Name Tool | Tool: predicts the likely gender with a confidence percentage |
| Nationalize Name Tool | Tool: predicts the likely nationalities with probabilities |
| Rest Countries Info Tool | Tool: supplies the flag, capital, and region for the top nationality |
| Text Generator | Logic: merges the results into one fun profile using the system prompt |
| User Chat Output | Output: delivers the styled profile to the chat |
