Betterness
Bett-iDocsTutorialsAboutAugmented Wellness

Overview

Trust

Resources

System

Get Started

Recipes

Reference

DocsCLIRecipesPipe Into Agents

Pipe Into Agents

Use the CLI as a structured-data source for autonomous agents.

Why this works

The CLI's --json output is stable, typed, and trivially parseable. Feeding it directly into an LLM context (or an OpenClaw agent) gives you a richer health picture than asking the agent to call individual MCP tools.

Pattern 1: pre-load context

BRIEF=$(betterness workflow daily-brief --json)
DEVICES=$(betterness connected-devices list --json)
RECENT=$(betterness biomarkers search --start-date 2026-01-01 --json)

cat <<EOF | claude --no-interactive
You're a health analyst. Use the data below to summarize the user's status:

DAILY_BRIEF: $BRIEF
DEVICES: $DEVICES
RECENT_BIOMARKERS: $RECENT
EOF

Pattern 2: pipe single command

betterness workflow daily-brief --json | your-agent-process

Pattern 3: scheduled agent

# crontab -e
0 7 * * * betterness workflow daily-brief --json | python /opt/health-agent/morning_summary.py

Pattern 4: combine with MCP

For interactive agents (Claude Code, Cursor), prefer MCP — it gives the agent autonomy to call additional tools as needed. The CLI is best for batch contexts where you want a deterministic snapshot.

Output stability

  • Top-level keys are stable across CLI versions
  • New fields may appear in patch versions — your parser should ignore unknown keys
  • Field removals are bumped to a major version with deprecation notice

See also

  • OpenClaw / BetterClaw — autonomous agent runtime
  • Cron and scripting
Cron & ScriptingCommand Reference
© 2026 Betterness Inc.
Privacy PolicyTerms of ServiceHealth Data