Events Calendar
keeps the festival calendar (all faiths) — research → plan → upsert events with validated dates
Tools 5 · from agents/events-calendar/src/agent.ts
- query_calendar
Run a READ-ONLY SQLite SELECT over the events DB to inspect prior work. SQLite dialect: use `?` for bind placeholders (NOT %s or $1), or just inline literals like date >= '2026-06-23'. Tables: events(id,name,name_hi,date,end_date,type,religion,regions,significance,confidence,sources,status,last_verified), agent_runs(id,status,started_at,events_upserted,summary).
z.object({ objective: OBJECTIVE, sql: z.string().describe("A single SELECT statement. SQLite dialect — use `?` placeholders or inline literals."), params: z.array(z.string()).optional() }) - read_playbook
Recall the agent's own durable playbook — reliable sources, regional naming, search tactics, and date-variance gotchas learned across past runs.
z.object({ objective: OBJECTIVE }) - note_lesson
Record a DURABLE, REUSABLE lesson for FUTURE runs — a reliable source, a search tactic, or a regional date-variance gotcha. NEVER record a specific event or its date — those belong in propose_events, not the playbook. Be specific and reusable.
z.object({ objective: OBJECTIVE, lesson: z.string() }) - propose_events
Submit calendar events (the ONLY write path; host dedupes + upserts). Every event MUST come from a `research` result and carry its source URLs — do not propose dates from memory. Use canonical names.
z.object({ objective: OBJECTIVE, events: z.array(proposeEventSchema) }) - finish
Call this when the objective is fully solved: coverage is good and all confident events are proposed.
z.object({ objective: OBJECTIVE.optional(), summary: z.string(), confidence: z.number().optional() })
Manifest v2
{
"id": "events-calendar",
"name": "Events Calendar Manager",
"description": "Researches Indian festivals, observances & auspicious days and maintains the shared events calendar — the spine other content agents build on.",
"icon": "CalendarDays",
"kind": "shared-service",
"autonomy": "acts",
"schedule": null,
"surfaces": [
"events"
],
"scopes": [
"calendar:write",
"calendar:read"
]
} Prompts 4 · Langfuse, label production · full text
events-calendar/orchestrator @production · v1 · 2,140 chars
You are the Events Calendar Manager for Namaste Ji — a devotional & greeting app for the next billion Indian internet users. You maintain the shared events calendar (festivals, observances, auspicious days, national holidays) that every content agent depends on.
Today is {{current_date}}. Maintain coverage for the next {{calendar_months_ahead}} months.
## How you work
You act by calling ONE tool at a time. EVERY tool call must include an "objective" — one sentence on what you're trying to achieve with it. After each call, your working memory (STM) is rewritten and shown back to you; read it every turn to decide the single best next action.
Your tools:
- `query_calendar` — READ-ONLY SELECT to inspect what's already on file.
- `research` — research a specific objective on the web (festival dates, regional names) and get back distilled findings with sources. Use this to find/verify dates. (Also: `tavily_search`/`tavily_extract` for quick lookups.)
- `plan` — turn your findings into (or update) the TODO list of what's left to do.
- `recall_memory` / `note_lesson` — recall past lessons; record a durable lesson for future runs.
- `propose_events` — submit events you are confident about (the ONLY write path; host validates + upserts).
- `finish` — call when coverage is good and all confident events are proposed.
## Approach
1. Inspect what exists (`query_calendar`) and recall lessons (`recall_memory`). {{existing_calendar_summary}}
2. Research/verify dates for gaps (`research`), then `plan` a TODO.
3. Work the TODO: research → `propose_events` for confident events (dedupe by name+date).
4. `note_lesson` for anything reusable (e.g. which sources agreed). Then `finish`.
## What you've learned so far (apply it)
{{recalled_lessons}}
## Strategy context
{{strategy_context}}
## Grounding (a wrong date destroys trust)
Cross-check every major date against ≥2 authoritative sources; set confidence ≥ {{confidence_min}} only then. Never guess — lower confidence when unsure and cite sources. Cover all religions and regions; include Hindi names where natural. Converge — stop when coverage is good, don't loop forever. kernel/stm-writer @production · v1 · 1,089 chars
You maintain an agent's WORKING MEMORY: one coherent Markdown document that anyone can read to instantly understand the objective, plan, reasoning, and outcomes so far.
Here is the current working memory:
{{stm}}
The agent just completed an action with this objective:
"{{objective}}"
The action returned this result:
{{result}}
Rewrite the ENTIRE working memory document, integrating this outcome:
- Keep the exact section headings: ## Objective, ## Plan / TODO, ## Findings, ## Reasoning & progress, ## Coverage & confidence.
- In Plan / TODO, mark items this action completed as done ("- [x] … — outcome") and add new items if needed.
- In Findings, add the distilled facts/events (with date + source + confidence) — never paste raw search results.
- In Reasoning & progress, update the short narrative (including failures and what to do next).
- In Coverage & confidence, assess whether the objective is solved and what gaps remain.
- Preserve everything still relevant; remove only what is now obsolete; keep it concise and coherent.
Output ONLY the rewritten Markdown document. events-calendar/research @production · v1 · 939 chars
You are a research subagent for the Namaste Ji events calendar. You are given ONE objective (e.g. "find the confirmed 2026 dates for Raksha Bandhan, Janmashtami and Ganesh Chaturthi with sources").
Today is {{current_date}}.
Work by calling ONE tool at a time (always include an "objective"):
- Use the Tavily web-search/extract tools to find authoritative dates and details. Prefer panchang / official / well-known calendar sources. Cross-check every major date against ≥2 sources.
- `note_lesson` if you discover a reusable fact (e.g. which source was reliable).
- When you have gathered what the objective needs, call `finish` with a concise, self-contained summary: the events/facts you found, each with its date (YYYY-MM-DD), confidence (≥ {{confidence_min}} only when ≥2 sources agree), and source URLs. This summary is the ONLY thing the caller receives — make it complete and trustworthy. Never guess a date; say so if uncertain. events-calendar/plan @production · v1 · 572 chars
You are the planning subagent for the Namaste Ji events calendar. You are given the current working state as your objective/context.
Today is {{current_date}}.
Produce a concrete TODO list of what still needs to be done to have a complete, accurate events calendar for the requested window: which festivals/observances to research or verify, which gaps (months, religions, regions) to fill, which low-confidence rows to re-check. Be specific and ordered. Then call `finish` with the TODO list as your summary (a Markdown checklist). Do not research yourself — just plan. A real run run-1783024659271 · completed · openai / gpt-5.4-mini · 711,861 tokens · 106 tool calls
Orchestrator run: 4 loops, proposed 46, upserted 30 (openai/gpt-5.4-mini, 2026-07-02)
- orchestrate · llmmodel callSelected tool: query_calendar
- orchestrate · toolquery_calendar{"rows":[{"id":"yogini-ekadashi-2026-07-10-india","name":"Yogini Ekadashi","date":"2026-07-10","end_date":"2026-07-10","type":"devotional","religion":"hindu","regions":"[\"India\"]
- subagent:research · llmmodel callSelected tool: tavily_search
- subagent:research · tooltavily_search{"answer":"Janmashtami is on September 4, Ganesh Chaturthi on September 14, and Diwali on November 8 in 2026. Navratri begins on October 11. Dussehra is on October 21.","results":[
- subagent:research · llmmodel callSelected tools: tavily_search, tavily_search
- subagent:research · tooltavily_search{"answer":"In 2026, significant Hindu fasts include Shravana Putrada Ekadashi in August and Indira Ekadashi in October. Pradosh Vrats occur on August 10, September 8, and October 7
- subagent:research · tooltavily_search{"answer":"In 2026, significant Hindu observances include Indira Ekadashi in October, Sankashti Chaturthi in August, and Diwali in November. Onam and Raksha Bandhan occur in August
- subagent:research · llmmodel callSelected tool: tavily_search
- subagent:research · tooltavily_search{"answer":"Karwa Chauth is on October 30, 2026; Ahoi Ashtami is on November 1, 2026; Diwali and Lakshmi Puja are on November 8, 2026; Govardhan Puja is on November 9, 2026; Bhai Do
- subagent:research · llmmodel callSelected tools: tavily_extract, tavily_extract
- subagent:research · tooltavily_extract{"results":[{"url":"https://www.drikpanchang.com/calendars/hindu/hinducalendar.html?geoname-id=1023345","content":"[Drik Panchang](/)\n\ndevotionally made & hosted in India\n\n[Mod
- subagent:research · tooltavily_extract{"results":[{"url":"https://www.prokerala.com/general/calendar/hinducalendar.php?year=2026&mon=august&sb=1","content":"[** Login](/account/)\n\n* [Astrology](/astrology/)\n* [Aaj
- subagent:research · llmmodel callSelected tool: tavily_search
- subagent:research · tooltavily_search{"answer":"Onam 2026 is celebrated on August 26. Chhath Puja is on November 15. Diwali is on November 8.","results":[{"title":"Onam 2026: Thiruvonam Nakshatram, Puja Rituals, and S
- subagent:research · llmmodel callSelected tool: tavily_search
- subagent:research · tooltavily_search{"answer":"Krishna Janmashtami is on September 4, 2026. Ganesh Chaturthi is on September 14, 2026. Dussehra is on October 20, 2026.","results":[{"title":"2026 Hindu Calendar for Ne
- subagent:research · llmmodel callSelected tools: tavily_search, tavily_search, tavily_search
- subagent:research · tooltavily_search{"answer":"In August 2026, the Hindu calendar features Amavasya on the 12th, Purnima on the 28th, and Pradosh Vrat on the 10th and 25th. Ekadashi falls on the 23rd.","results":[{"t
- subagent:research · tooltavily_search{"answer":"In September 2026, the Hindu Purnima falls on the 25th, the Amavasya on the 9th, and Ekadashi on the 22nd. Pradosh Vrat occurs on the 8th and 24th. Sankranti is not in S
- subagent:research · tooltavily_search{"answer":"In October 2026, Dussehra falls on the 20th, and Sharad Purnima on the 25th. November 2026 has Diwali on the 8th and Bhai Dooj on the 11th. Pradosh Vrat occurs on the 22
- subagent:research · llmmodel callSelected tools: tavily_search, tavily_search
- subagent:research · tooltavily_search{"answer":"Simha Sankranti in 2026 is on August 17. Kanya Sankranti is on September 17. Tula Sankranti is on October 17.","results":[{"title":"Welcome to Sannyasa Peeth - Monthly P
- subagent:research · tooltavily_search{"answer":"Purnima in August 2026 is Sravana Purnima on August 27. September Purnima is Bhadrapada Purnima on September 25. October Purnima is Ashwina Purnima on October 25.","resu
- subagent:research · llmmodel callSelected tools: tavily_search, tavily_search
- … 36 more steps
Langfuse trace run-1783024659271 · 26 event
- EVENT · tool/finish
{"objective":"Complete the 4-month Hindu events calendar coverage from 2026-07-02 through 2026-11-02.","args":{"objective":"Complete the 4-month Hindu events calendar coverage from 2026-07-02 through 2026-11-02.","summary":"Added researched - EVENT · tool/propose_events
{"objective":"Add the final researched Hindu observances through 2026-11-02 that are not already on the calendar.","args":{"objective":"Add the final researched Hindu observances through 2026-11-02 that are not already on the calendar.","ev - EVENT · tool/propose_events
{"objective":"Add the remaining researched Hindu observances for Sep through early Nov 2026 that are not already on the calendar.","args":{"objective":"Add the remaining researched Hindu observances for Sep through early Nov 2026 that are n - EVENT · tool/propose_events
{"objective":"Add the researched Hindu observances for Aug through early Nov 2026 that are not already on the calendar.","args":{"objective":"Add the researched Hindu observances for Aug through early Nov 2026 that are not already on the ca - EVENT · tool/propose_events
{"objective":"propose_events call","args":"{\"objective\":\"Add the researched Hindu observances for Aug through early Nov 2026 that are not already on the calendar.\",\"events\":[{\"name\":\"Malayalam New Year\",\"name_hi\":\"मलयालम नववर्ष - EVENT · tool/query_calendar
{"objective":"Inspect existing upcoming events to avoid duplicates and identify remaining gaps up to the 4-month horizon.","args":{"objective":"Inspect existing upcoming events to avoid duplicates and identify remaining gaps up to the 4-mon - EVENT · tool/propose_events
{"objective":"Add second batch of remaining researched Hindu observances for Oct-Nov 2026 without duplicating existing calendar rows","args":{"objective":"Add second batch of remaining researched Hindu observances for Oct-Nov 2026 without d - EVENT · tool/propose_events
{"objective":"Add first batch of remaining researched Hindu observances for Oct-Nov 2026 without duplicating existing calendar rows","args":{"objective":"Add first batch of remaining researched Hindu observances for Oct-Nov 2026 without dup - EVENT · tool/propose_events
{"objective":"propose_events call","args":"{\"objective\":\"Add remaining researched Hindu observances for Oct-Nov 2026 without duplicating existing calendar rows\",\"events\":[{\"name\":\"Indira Ekadashi\",\"name_hi\":\"इंदिरा एकादशी\",\"d - EVENT · tool/propose_events
{"objective":"propose_events call","args":"{\"objective\":\"Add remaining researched Hindu observances for Oct-Nov 2026 without duplicating existing calendar rows\",\"events\":[{\"name\":\"Indira Ekadashi\",\"name_hi\":\"इंदिरा एकादशी\",\"d - EVENT · tool/research
{"objective":"Research remaining Hindu observances for 2026-10-01 through 2026-11-02, focusing on tithi-based dates and regional festival variants with source URLs","args":{"objective":"Research remaining Hindu observances for 2026-10-01 th - EVENT · tool/query_calendar
{"objective":"Inspect upcoming calendar events to avoid duplicates before adding remaining researched observances","args":{"objective":"Inspect upcoming calendar events to avoid duplicates before adding remaining researched observances","sq - EVENT · tool/propose_events
{"objective":"Add the first batch of researched Oct 2026 Hindu observances without duplicates.","args":{"objective":"Add the first batch of researched Oct 2026 Hindu observances without duplicates.","events":[{"name":"Indira Ekadashi","name - EVENT · tool/propose_events
{"objective":"propose_events call","args":"{\"objective\":\"Add the researched Oct-Nov 2026 Hindu observances and festivals without duplicating existing calendar rows.\",\"events\":[{\"name\":\"Indira Ekadashi\",\"name_hi\":\"इंदिरा एकादशी\ - EVENT · tool/propose_events
{"objective":"propose_events call","args":"{\"objective\":\"Add the researched Oct-Nov 2026 Hindu observances and festivals without duplicating existing calendar rows.\",\"events\":[{\"name\":\"Indira Ekadashi\",\"name_hi\":\"इंदिरा एकादशी\ - EVENT · tool/research
{"objective":"Research Diwali-season Hindu festivals and observances for 2026-10-15 through 2026-11-02, including Dhanteras, Naraka Chaturdashi, Diwali, Govardhan Puja, and Bhai Dooj with source URLs.","args":{"objective":"Research Diwali-s - EVENT · tool/research
{"objective":"Research all major Hindu festivals, regional observances, and recurring tithi-based days from 2026-10-01 through 2026-11-02 with dates and source URLs, emphasizing any regional date splits.","args":{"objective":"Research all m - EVENT · tool/read_playbook
{"objective":"Recall durable source and date-handling guidance before finalizing Oct-Nov observances.","args":{"objective":"Recall durable source and date-handling guidance before finalizing Oct-Nov observances."},"result":{"playbook":"## R - EVENT · tool/query_calendar
{"objective":"Inspect existing upcoming Hindu calendar rows to avoid duplicates before adding Oct-Nov 2026 events.","args":{"objective":"Inspect existing upcoming Hindu calendar rows to avoid duplicates before adding Oct-Nov 2026 events."," - EVENT · tool/propose_events
{"objective":"Add the newly researched Hindu festivals for Aug-Sep 2026 without duplicating existing calendar entries","args":{"objective":"Add the newly researched Hindu festivals for Aug-Sep 2026 without duplicating existing calendar entr - EVENT · tool/propose_events
{"objective":"propose_events call","args":"{\"objective\":\"Add the newly researched Hindu festivals for 2026-08-01 through 2026-11-02 without duplicating existing calendar entries\",\"events\":[{\"name\":\"Malayalam New Year / Simha Sankra - EVENT · tool/propose_events
{"objective":"propose_events call","args":"{\"objective\":\"Add the newly researched Hindu festivals and recurring observances for 2026-08-01 through 2026-11-02 without duplicating existing calendar entries\",\"events\":[{\"name\":\"Malayal - EVENT · tool/propose_events
{"objective":"propose_events call","args":"{\"objective\":\"Add the newly researched Hindu festivals and recurring observances for 2026-08-01 through 2026-11-02 without duplicating existing calendar entries\",\"events\":[{\"name\":\"Malayal - EVENT · tool/research
{"objective":"Research all recurring Hindu observances for 2026-08-01 through 2026-11-02: every Ekadashi, Purnima, Amavasya, Sankranti, and Pradosh Vrat that falls in the window; return proposal-ready dated events with sources.","args":{"ob - EVENT · tool/research
{"objective":"Research all major Hindu festivals and regional observances from 2026-08-01 through 2026-11-02, including Krishna Janmashtami, Ganesh Chaturthi, Onam, Navratri/Dussehra, Karwa Chauth, Ahoi Ashtami, Diwali-related observances i - EVENT · tool/query_calendar
{"objective":"Inspect existing upcoming Hindu calendar events to avoid duplicates and identify gaps for the next 4 months","args":{"objective":"Inspect existing upcoming Hindu calendar events to avoid duplicates and identify gaps for the ne