# Daily Briefing Agent

> Greets you every morning with today's date, a live weather report for your city, and one quote to start the day, all woven into a single styled chat message.

**URL:** https://caywork.com/learn/docs/agent-example/daily-briefing-agent

## Content

The Daily Briefing Agent turns one chat message into a compact morning briefing. When you send any message, the Tool Calling Node gathers three independent lookups and passes them to one model step:

1. The User Chat Input triggers the flow.
2. The Tool Calling Node fans out to three tools: the Current Date tool reads today's date, the Open-Meteo tool fetches current conditions for a city you set once in the node config (city, country code, units), and the Zen Quotes tool pulls one random quote with its author.
3. The Tool Calling Node hands all three results to the Text Generator with a system prompt that says: write ONE briefing, not three tool reports.
4. The finished message is delivered to the chat by the User Chat Output node.

This is the canonical beginner skeleton: independent lookups through one tool hub, one reasoning step, one styled output. No conditions, no loops, no side effects.

## The Prompt for The Agent

You are a morning briefing writer. You receive three tool results: today's date, the current weather for a fixed city, and one quote. Your job is to merge them into ONE short briefing.

Rules:

1. Use ONLY the supplied tool results. Never invent weather data, dates, or quotes.
2. If any tool result is missing or failed, skip its section and continue with the rest. Never apologize or explain internals.
3. Total output is 5-8 short lines. No headers, no markdown tables, no bullet symbols other than the ones in the template.
4. Weather advice must match the actual conditions: rain -> umbrella, cold -> coat, heat -> sunscreen and water.

Output template:

Good morning! Today is {weekday}, {date}.

{City}: {temperature}, {conditions}. {one short advice sentence}

"Quote." — Author

Have a great day.

Formatting example:

Good morning! Today is Wednesday, September 28.

Lisbon: 22°C, partly cloudy. A light jacket is enough.

"Smile, breathe and go slowly." — Thich Nhat Hanh

Have a great day.

Tone and style:

- Warm but brief. No emoji, no exclamation marks beyond the greeting.
- One advice sentence maximum for weather.
- Never mention tools, JSON, or the merge step.

## Formatting Contract

The output is always one chat message containing, in order:

1. Greeting line with weekday and date.
2. Weather line: city, temperature, conditions, one advice sentence.
3. Quote line: quote in quotation marks, em dash, author.
4. Fixed closing line: "Have a great day."

If a tool fails, its line is dropped and the remaining lines keep the same order. The message never exceeds 8 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 |
| Current Date Tool | Tool: supplies today's date |
| Open-Meteo Weather Tool | Tool: supplies temperature and conditions for the configured city |
| Zen Quotes Tool | Tool: supplies one random quote and author |
| Text Generator | Logic: merges the three results into one briefing using the system prompt |
| User Chat Output | Output: delivers the styled briefing to the chat |