← All tutorialsPersonal

Daily-briefing agent

Every morning at 7am: scan the news in your topics, summarize, email you. Costs about $0.03/day.

Cost~$0.03 per briefing
Operations
web_search.querytext_generation.generateemail.send

Prerequisites

  • Cron at 07:00 in your timezone.
  • A list of 3–5 topics you care about.

Walkthrough

1. Loop topics

For each topic, web_search.query with the topic + 'today'. Collect 3 results per topic.

2. Summarize

One GPT-4o-mini call: 'Brief me in 5 bullets per topic.'

3. Email

Send to yourself. Use idempotency_key = `briefing_YYYY-MM-DD` so a duplicate cron run never double-sends.

bash# Date-stamped idempotency_key makes a duplicate cron run a no-op.
curl -X POST https://www.upivia.com/v1/service-requests \
  -H "Authorization: Bearer $AGENT_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "service":"email",
    "operation":"send",
    "payload":{"to":"you@x.com","subject":"Daily Briefing","body":"<html>"},
    "idempotency_key":"briefing_2026-05-22"
  }'

Next steps

Audit every call at /audit-logs, watch spend at /usage, and tune budgets per service on the agent's page.

Create an account →