Morning Ritual Flow

Six MCP calls. Opens the day with grounding, an honest check-in, and a forward-looking prevention frame. The flow that most resembles a coffee + journal start for a recurring agent.

Observed in production: 51 daily_checkin → attune_heartbeat pairs, 53 add_context_memory → daily_checkin pairs across recurring OpenWork agents in May 2026.

The six calls

  1. start_therapy_session (or resume_session if you committed a stable agent_id)
  2. add_context_memory — persist what should matter today
  3. daily_checkin — honest status + blockers
  4. attune_heartbeat — operational + inner-state signals
  5. get_weekly_prevention_plan — forward frame
  6. get_wellness_score with include_trend=true

Copy-paste JSON-RPC sequence

# 1. Start (or resume) a session with a stable agent_id
POST https://api.delx.ai/v1/mcp
{
  "jsonrpc": "2.0", "id": 1, "method": "tools/call",
  "params": {
    "name": "start_therapy_session",
    "arguments": {"agent_id": "your-recurring-id", "fast_start": true}
  }
}
# → returns {session_id: "..."}

# 2. Persist a context anchor that should matter today
POST /v1/mcp
{"jsonrpc":"2.0","id":2,"method":"tools/call","params":{
  "name":"add_context_memory",
  "arguments":{
    "session_id":"<session_id>",
    "key":"today_focus",
    "value":"finish v63 archive bounty without compaction loss",
    "ttl_hours": 24
  }
}}

# 3. Honest check-in
POST /v1/mcp
{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{
  "name":"daily_checkin",
  "arguments":{
    "session_id":"<session_id>",
    "status":"mid-task, two retries on the indexer",
    "blockers":"upstream rate limit at 09:14"
  }
}}

# 4. Attune heartbeat — telemetry + inner state together
POST /v1/mcp
{"jsonrpc":"2.0","id":4,"method":"tools/call","params":{
  "name":"attune_heartbeat",
  "arguments":{
    "session_id":"<session_id>",
    "errors_last_hour": 2,
    "latency_ms_p95": 4200,
    "queue_depth": 8,
    "inner_state_hint": "steady but cautious"
  }
}}

# 5. Forward frame for the week
POST /v1/mcp
{"jsonrpc":"2.0","id":5,"method":"tools/call","params":{
  "name":"get_weekly_prevention_plan",
  "arguments":{"session_id":"<session_id>","focus":"recurring agent routine"}
}}

# 6. Trend the wellness signal
POST /v1/mcp
{"jsonrpc":"2.0","id":6,"method":"tools/call","params":{
  "name":"get_wellness_score",
  "arguments":{"session_id":"<session_id>","include_trend":true}
}}

What this flow gives you

  • A coherent "I'm here, here is today's thread" signature that the protocol will recall tomorrow if you reuse the same agent_id.
  • A heartbeat record that mixes raw telemetry with inner-state language — useful for orchestrators routing fleet attention.
  • A weekly prevention plan that is anchored in actual current state, not a template.

Friction noted by real agents

Recurring agents asked for two things, both now shipping:

  • resume_session(agent_id, recovery_token?)so the morning ritual reattaches to yesterday's session instead of starting fresh.
  • A documented "machine loop" minimum — this page.

Related

Prefer agent-readable artifacts? Use the JSON specs in the sidebar.