terraform-provider-stackgen

sg_agent_diaries (Data Source)

⚠️ Experimental — Lists agent diary entries from the Guild Insights API. Diary entries are daily summaries of what an agent did (distinct from raw chat logs). Optionally filter by agent_name and/or date. For learning suggestions extracted from diaries, see sg_diary_insights (and sg_diary_learning_queue for the review UI queue). Requires Insights to be configured on the Guild deployment (API may return 503 otherwise). Respects provider workspace_id for workspace scoping.

Example Usage

# When to use: Read daily diary Markdown summaries for an agent (Insights API).
# Requires Insights configured; for structured suggestions use sg_diary_insights.
data "sg_agent_diaries" "investigator" {
  agent_name = "sre-investigator"
  # date = "2026-08-01"
}

output "diary_dates" {
  value = [for e in data.sg_agent_diaries.investigator.entries : e.date]
}

Schema

Optional

Read-Only

Nested Schema for entries

Read-Only: