Projects

Daily agent briefing system

A TypeScript workflow for daily AI-agent briefings from structured logs, with email summaries, an issue-triggered phone path, and report history.

  • Software

My work on daily briefings for OpenClaw agents makes their tasks and failures easier to review. The project connects structured task logs, a TypeScript reporter, generated email and voice summaries, and Inkbox delivery.

When
April 2026
Where
Cursor Boston Hack-a-Sprint
Role
Designer and developer
Input
One JSON line per agent task, in a daily log file
Output
An HTML email every day, and a phone call when something failed
History
Daily counts and delivery flags in Inkbox Vault
Tools
TypeScript, Node.js, Anthropic API, Ollama, Inkbox, WebSocket, ngrok, launchd

Credit. Built on OpenClaw agents and Inkbox's email, phone, and vault services, which are other teams' products.

A synthetic log entry, one JSON line in the day's log: agent inventory-bot, timestamp 2026-04-18T06:40:00Z, status error, task Reconcile stock counts, details Feed returned no rows.

The reporter reads the day's log and counts errors and warnings. Every day it sends an HTML email summary.

Only when the day has errors or warnings, a second path runs: a spoken script, a local WebSocket server, an ngrok tunnel, an Inkbox phone call, and text-to-speech.

Both paths end in an Inkbox Vault record that holds counts and delivery flags only, with synthetic values here: date 2026-04-18, 14 tasks, 1 error, 2 warnings, email sent yes, call placed yes.

One day of the briefing run. The email goes out every day; the dashed phone path runs only when something failed or warned. The log entry and the stored values are synthetic.

The task-log contract

Each agent appends one JSON object per task to a log file named for the day. An entry records the agent’s name, a timestamp, a status of success, error, warning, or skipped, a short task description, and free-text details. A small command-line writer rejects entries with missing fields or an unknown status, so the reporter can rely on the shape.

The daily run

  1. A launchd job starts the reporter each morning through a wrapper script.
  2. The reporter reads the day’s log, counts errors and warnings, and loads the previous day’s counts for comparison.
  3. A model writes the HTML summary, and the reporter sends it from an Inkbox agent identity. A day with no entries sends a short fixed note.
  4. If there were errors or warnings, the reporter also has the model write a short spoken script. It starts a local WebSocket server, exposes it through ngrok, and Inkbox places a phone call that streams the script to text-to-speech.
  5. The run stores that day’s counts and whether the email and call went out in Inkbox Vault. Running again on the same day updates that day’s entry.

A history command prints those stored days as a table. Only counts and delivery flags are stored, not the logs themselves.

Model choice

One setting chooses the model. A value with an ollama: prefix sends requests to a local Ollama server through its OpenAI-compatible API. Anything else goes to Anthropic.

Demo data

The sample logs in the project are synthetic: invented entries across eight fictional agents.