A weekly revenue brief your LLM writes
The job: Monday morning, a short written brief on what happened last week and what it means — assembled from your own data, not from a dashboard nobody opens.
Who this is for: founders and heads of growth who want the number and the sentence explaining it.
Before you start
- You need an API key (
sk_sig_…) — mint one under Exports & API in the dashboard. The plaintext is shown exactly once; store it asSIGNAL_API_KEY. - You need a connected store, for anything touching revenue or orders. Without one those endpoints return empty rather than failing, which is easy to misread as "no sales".
Gather, then write
Two steps, deliberately separate. Gathering is deterministic and should not involve a model. Writing is the part a model is good at.
import json, requests
BASE = "https://app.signal.geysera.com/signal-api/v1"
H = {"Authorization": f"Bearer {READ_KEY}"}
brief_inputs = {
"attribution": requests.get(f"{BASE}/attribution", params={"days": 7}, headers=H).json(),
"attribution_prior": requests.get(f"{BASE}/attribution", params={"days": 14}, headers=H).json(),
"recommendations": requests.get(f"{BASE}/recommendations", headers=H).json(),
"top_accounts": requests.get(f"{BASE}/accounts",
params={"page_size": 25}, headers=H).json(),
}
There is no "last week versus the week before" endpoint. Two windows and a subtraction is the honest way to get it, and it makes the comparison explicit rather than hidden inside a metric.
Ask the commerce questions in English
The REST API covers acquisition. For revenue, ask:
def ask(q):
r = requests.post(
"https://app.signal.geysera.com/agent-api/signal/copilot/ask",
headers={"Authorization": f"Bearer {COPILOT_KEY}"},
json={"question": q}, timeout=60)
return r.json()
brief_inputs["revenue"] = ask("What was revenue last week compared with the week before?")
brief_inputs["products"] = ask("Which products sold most last week?")
Each returns answer for humans and trace[].data for machines, plus
disclosures — caveats the system attached because they change how the number
should be read. Pass the disclosures through. They are the difference between
a brief and a misleading brief.
The prompt
Write a Monday brief for the founder of a company. Maximum 250 words.
Data:
{brief_inputs_json}
Rules:
- Lead with the single most important change, not a list.
- Every number you state must appear in the data above. If you want to state a
percentage change, compute it from two numbers that are both there.
- Repeat any disclosure that affects how a number should be read.
- End with ONE thing to do this week, drawn from the recommendations payload,
naming the evidence behind it.
- If the week was unremarkable, say that in one sentence. Do not manufacture a
narrative.
That final rule is what makes the brief trustworthy over time. A brief that finds drama every week teaches the reader to ignore it.
Scheduling
Any cron. The gathering takes seconds; the copilot calls take tens of seconds, so give the job a couple of minutes.
0 7 * * 1 /usr/bin/python3 /opt/briefs/weekly.py | mail -s "Monday brief" you@company.com
What will go wrong
The copilot refuses. It does that rather than answer from data it does not
have. refusal is prose explaining why; put it in the brief verbatim instead
of dropping the section, so a missing number is visible rather than silently
absent.
Windows that include a gap. If order sync was broken for two days, a
7-day total is understated and the copilot will say so in disclosures. A
brief that drops disclosures will report a fall in revenue that did not happen.
Comparisons across a plan-cap boundary. total is capped at what your plan
may resolve. If you crossed the cap mid-week, week-over-week visitor counts are
not comparable and the difference is billing, not behaviour.
Next: find the pages that create pipeline · ask questions in natural language
Markdown source: /developers/workflows/a-weekly-revenue-brief-your-llm-writes.md