A nightly agent that produces a structured daily digest file + a machine-parseable RESULT: line on stdout. No human in the loop.
Corresponds to Part 7.5 of the developer guide.
max_iterations=40 cap, strict output contract, fail-loud exits.agentao/skills/daily-digest/SKILL.mdSdkTransport(on_event=…) hookRESULT: {...} line for the scheduler to parseCronJob manifest with concurrencyPolicy: Forbidcp .env.example .env # fill in OPENAI_API_KEY
uv sync
uv run python -m src.daily_digest
Expected stdout on success:
{"status": "ok", "date": "2026-04-17", "tokens_est": 1823, "path": "digest.md", "items": 7}
Exit codes: 0 success, 2 agent error or contract violation.
| Path | Role |
|---|---|
src/daily_digest.py |
Entry point — builds agent, activates skill, parses RESULT: line |
.agentao/skills/daily-digest/SKILL.md |
Output contract the LLM must obey |
k8s/cronjob.yaml |
Reference Kubernetes schedule (not applied automatically) |
.env.example |
Template for the runtime credentials |
runs/<date>/ |
Per-run working directory, created on first run (git-ignored) |
RESULT: line parses successfullykubectl apply -f k8s/cronjob.yaml is your call