🌅 Fulcra Morning Briefing
Deliver a personalized morning briefing calibrated to how your human actually slept. Bad night? Keep it short and gentle. Great sleep? Go deep on the day ahead.
This is the lightweight entry point to Fulcra. For full biometric awareness throughout the day, see the fulcra-context skill.
What You'll Compose
A morning briefing that includes:
- - Sleep summary — hours, quality, deep/REM breakdown
- Body check — resting heart rate, HRV (recovery signal)
- Today's schedule — calendar events with timing
- Weather — current conditions for your human's location
- Energy-calibrated tone — the briefing adapts to sleep quality
Setup
1. Your Human Needs a Fulcra Account
Free via the Context iOS app or Fulcra Portal.
Your human can try Context free, then 30% off with code FULCLAW.
2. Install the Python Client
CODEBLOCK0
3. Authenticate via OAuth2 Device Flow
Run this once interactively — your human approves access on their phone/browser:
CODEBLOCK1
The device flow will print something like:
CODEBLOCK2
Your human visits that URL, logs in, and approves. That's it.
4. Token Refresh
Tokens expire in ~24 hours. When expired, re-run the device flow. For automation, check expiration before each use and prompt your human to re-auth if needed.
How to Collect Data
Loading a Saved Token
CODEBLOCK3
Sleep Data (Last Night)
CODEBLOCK4
Sleep stage values: INLINECODE0
Quality heuristic:
- - Excellent: ≥7h sleep, ≥15% deep, ≥20% REM
- Good: ≥6h, decent deep/REM
- Fair: ≥6h but low deep (<10%) or low REM (<15%)
- Poor: <6h total sleep
Heart Rate (Overnight/Recent)
CODEBLOCK5
HRV (Recovery Signal)
CODEBLOCK6
Higher HRV = better recovery. Typical range: 20-80ms (varies hugely by person).
Calendar (Today's Events)
CODEBLOCK7
Weather (via wttr.in — no API key needed)
CODEBLOCK8
Replace YOUR_CITY with your human's location (e.g., New+York, London, San+Francisco).
Steps (Yesterday)
CODEBLOCK9
Composing the Briefing
This is where the magic happens. Calibrate everything to sleep quality.
Poor Sleep (< 6 hours)
Keep it short, warm, and gentle. Your human is running on fumes.
CODEBLOCK10
Rules for poor sleep briefings:
- - No exclamation marks or forced cheerfulness
- Mention only essential calendar items
- Suggest deferring non-critical tasks
- Keep under 100 words
- Gentle, supportive tone
Fair Sleep (6-7h, low quality)
Moderate detail, practical tone. They're functional but not at 100%.
CODEBLOCK11
Good Sleep (7h+, solid quality)
Full detail, upbeat, actionable. They can handle it.
CODEBLOCK12
Excellent Sleep (7h+, great deep & REM)
Detailed, enthusiastic, ambitious. Push them to make the most of a great day.
CODEBLOCK13
Tone Calibration Summary
| Sleep Quality | Length | Tone | Calendar Detail | Suggestions |
|---|
| Poor (<6h) | Short (~80 words) | Gentle, supportive | Essentials only | Defer, rest |
| Fair (6-7h) |
Medium (~120 words) | Practical, steady | Key events + tips | Pace yourself |
| Good (7h+) | Full (~160 words) | Upbeat, actionable | All events + prep notes | Make it count |
| Excellent (7h+, great stages) | Full+ (~180 words) | Enthusiastic, ambitious | All events + opportunities | Push hard |
Using curl Instead of Python
If Python/fulcra-api isn't available, use the REST API directly:
CODEBLOCK14
Automation
Cron Job (Daily Briefing)
Set up a cron or OpenClaw scheduled task to run the briefing every morning:
CODEBLOCK15
Then have your agent read /tmp/briefing.json and compose the briefing using the tone rules above.
OpenClaw Heartbeat
Add to your HEARTBEAT.md:
CODEBLOCK16
Demo Mode
For public demos and presentations, enable demo mode to use synthetic calendar and location data while keeping real biometrics (sleep, HR, HRV, steps).
Activation
CODEBLOCK17
How it works
- - Biometrics stay real — sleep, heart rate, HRV, and steps come from the real Fulcra API (if a token is available; gracefully degrades if not)
- Calendar is synthetic — rotating schedules with realistic events, locations, and timing
- Location is synthetic — time-aware NYC locations (office in the morning, lunch spots midday, evening spots after work)
- Weather stays real — pulled from wttr.in as usual
Transparency
The output JSON includes "demo_mode": true at the top level, and synthetic data objects also carry "demo_mode": true. When composing a briefing from demo data, include a subtle "📍 Demo mode" note.
Synthetic data details
- - 3 rotating daily schedules — picked deterministically by date so back-to-back demos on the same day look consistent
- Events include locations — Blue Bottle Coffee, Juliana's Pizza, Brooklyn Bridge Park, etc.
- Location rotates by time of day — DUMBO during work hours, SoHo at lunch, Williamsburg in the evening
Privacy
- - NEVER share your human's sleep, HR, HRV, or calendar data publicly
- In group chats, say "they slept well" not "they got 7.4 hours with 18% deep sleep"
- Calendar event titles may contain sensitive info — summarize, don't quote
- This data is intimate. Treat it that way.
Going Deeper: fulcra-context
This skill covers morning briefings. For all-day biometric awareness — stress detection, workout recovery, travel context, location awareness, and more — see the full fulcra-context skill.
Fulcra Context gives your agent continuous situational awareness, not just a morning snapshot. If your human likes the briefing, that's the natural next step.
Links
🌅 Fulcra 晨间简报
根据用户实际的睡眠情况,提供个性化的晨间简报。昨晚没睡好?保持简短温和。睡眠质量极佳?深入探讨当天安排。
这是 Fulcra 的轻量级入口。如需全天候的生物特征感知,请参阅 fulcra-context 技能。
你需要撰写的内容
一份包含以下内容的晨间简报:
- - 睡眠摘要 — 时长、质量、深度睡眠/快速眼动睡眠占比
- 身体检查 — 静息心率、心率变异性(恢复信号)
- 今日日程 — 带时间的日历事件
- 天气 — 用户所在地的当前状况
- 能量校准语气 — 简报根据睡眠质量调整
设置
1. 用户需要一个 Fulcra 账户
通过 Context iOS 应用 或 Fulcra 门户 免费获取。
用户可以免费试用 Context,然后使用代码 FULCLAW 享受 7 折优惠。
2. 安装 Python 客户端
bash
pip3 install fulcra-api
3. 通过 OAuth2 设备流进行身份验证
以交互方式运行一次 — 用户在手机/浏览器上批准访问:
python
from fulcra_api.core import FulcraAPI
import json, os
from datetime import datetime
api = FulcraAPI()
api.authorize() # 打印一个 URL — 用户访问并批准
保存令牌以供重复使用
os.makedirs(os.path.expanduser(~/.config/fulcra), exist_ok=True)
token_data = {
access
token: api.fulcracached
accesstoken,
expiration: api.fulcra
cachedaccess
tokenexpiration.isoformat(),
user
id: api.getfulcra_userid()
}
with open(os.path.expanduser(~/.config/fulcra/token.json), w) as f:
json.dump(token_data, f)
print(✅ 令牌已保存。有效期约 24 小时。)
设备流将打印类似以下内容:
访问 https://auth.fulcradynamics.com/activate 并输入代码:XXXX-XXXX
用户访问该 URL,登录并批准。就这样。
4. 令牌刷新
令牌约 24 小时后过期。过期后,重新运行设备流。对于自动化,每次使用前检查过期时间,并在需要时提示用户重新认证。
如何收集数据
加载已保存的令牌
python
import json, os
from datetime import datetime, timezone, timedelta
from fulcra_api.core import FulcraAPI
TOKEN_FILE = os.path.expanduser(~/.config/fulcra/token.json)
with open(TOKEN_FILE) as f:
token_data = json.load(f)
api = FulcraAPI()
api.fulcracachedaccesstoken = tokendata[access_token]
api.fulcracachedaccesstokenexpiration = datetime.fromisoformat(token_data[expiration])
睡眠数据(昨晚)
python
now = datetime.now(timezone.utc)
start = (now - timedelta(hours=14)).isoformat()
end = now.isoformat()
samples = api.metric_samples(start, end, SleepStage)
睡眠阶段值:0=在床上, 1=清醒, 2=核心/浅睡, 3=深度睡眠, 4=快速眼动睡眠
质量启发式判断:
- - 极佳: ≥7小时睡眠,≥15%深度睡眠,≥20%快速眼动睡眠
- 良好: ≥6小时,深度睡眠/快速眼动睡眠尚可
- 一般: ≥6小时但深度睡眠低(<10%)或快速眼动睡眠低(<15%)
- 差: 总睡眠时间<6小时
心率(夜间/近期)
python
samples = api.metric_samples(
(now - timedelta(hours=10)).isoformat(),
now.isoformat(),
HeartRate
)
values = [s[value] for s in samples if value in s]
avg_hr = sum(values) / len(values)
resting_estimate = sorted(values)[:max(1, len(values)//10)][-1]
心率变异性(恢复信号)
python
samples = api.metric_samples(
(now - timedelta(hours=12)).isoformat(),
now.isoformat(),
HeartRateVariabilitySDNN
)
values = [s[value] for s in samples if value in s]
avg_hrv = sum(values) / len(values)
心率变异性越高 = 恢复越好。典型范围:20-80毫秒(因人而异)。
日历(今日事件)
python
根据用户时区调整开始时间
day_start = now.replace(hour=5, minute=0, second=0, microsecond=0) # 5 UTC ≈ 美东时间午夜
day
end = daystart + timedelta(hours=24)
events = api.calendarevents(daystart.isoformat(), day_end.isoformat())
for e in events:
print(f{e.get(title)} — {e.get(start_time)} {📍 + e[location] if e.get(location) else })
天气(通过 wttr.in — 无需 API 密钥)
bash
一行命令获取当前状况
curl -s wttr.in/YOUR_CITY?format=%l:+%c+%t+%h+%w
JSON 格式用于解析
curl -s wttr.in/YOUR_CITY?format=j1
将 YOUR_CITY 替换为用户所在地(例如 New+York、London、San+Francisco)。
步数(昨天)
python
samples = api.metric_samples(
(now - timedelta(hours=24)).isoformat(),
now.isoformat(),
StepCount
)
total_steps = sum(s.get(value, 0) for s in samples)
撰写简报
这就是魔法的所在。将所有内容根据睡眠质量进行调整。
睡眠差(< 6 小时)
保持简短、温暖、温和。用户已经精疲力竭。
☁️ 早上好。你睡了大约 4.5 小时 — 不太顺利。
静息心率略高,为 68。你的身体今天需要更努力地工作。
你有 2 个会议 — 上午 10 点的站会和下午 2 点的评审会。
考虑推迟任何非紧急事项。
52°F,多云。适合喝咖啡的天气。
今天放轻松。💛
睡眠差简报的规则:
- - 不要使用感叹号或强行欢快的语气
- 只提及必要的日历事项
- 建议推迟非关键任务
- 控制在 100 字以内
- 温和、支持的语气
睡眠一般(6-7 小时,质量低)
中等详细程度,实用语气。 他们能正常工作但不在最佳状态。
🌤 早上好 — 你睡了 6.2 小时。不算差,但深度睡眠只有
8%,所以你可能感觉昏昏沉沉。
平均心率 62,心率变异性 38 毫秒 — 你的身体状态还行。
今天:上午 10 点站会,12:30 与 Sarah 共进午餐(别忘了!),
下午 3 点季度评审。你可能想在今天上午的专注高峰时段
为此做准备。
纽约市:65°F,局部多云,适合散步。
你能行的。保持节奏。
睡眠良好(7 小时以上,质量稳定)
完整详细,积极向上,可操作。 他们能够应对。
☀️ 早上好!扎实的 7.4 小时 — 18% 深度睡眠,22% 快速眼动睡眠。
你的大脑昨晚工作得很好。
静息心率 58,心率变异性 52 毫秒 — 你恢复得很好。
今天适合处理困难的事情。
📅 今日安排:
• 9:30 — 团队同步会
• 11:00 — 与 Jamie 一对一(准备:回顾 Q3 路线图)
• 12:30 — 午餐(没有会议 — 保护好这段时间!)
• 3:00 — 设计评审(会议室 B)
• 5:00 — 去健身房?昨天走了 4,200 步 — 可以多活动一下。
🌤 纽约市:72°F,晴朗,湿度 45%。美好的一天。
让我们好好利用这一天!💪
睡眠极佳(7 小时以上,深度睡眠和快速眼动睡眠都很棒)
详细、热情、雄心勃勃。 推动他们充分利用美好的一天。
🔥 早上好!8.1 小时,20% 深度睡眠,25% 快速眼动睡眠 — 教科书般的恢复