AI coach: memory, search, tools

The coach is a tool-using agent with multi-turn memory, hybrid retrieval over your ride history, and prompt versioning.

Memory

  • Profile memory: durable facts, goals, equipment, FTP, athlete signals.
  • Episodic memory: recent chat history with semantic + keyword retrieval (hybrid search).
  • Fire-and-forget extraction: conversation-end triggers a background pass to update profile facts and topics — never blocks the response.

Tools available to the coach

  • searchRides — date, distance, terrain, location filters.
  • getRideDetails — power, HR, climbing, TSS, IF for one ride.
  • weeklySummary, fitnessAnalysis — load and form views.

Prompt versioning

System prompts are stored and versioned in Langfuse. The coach loads the latest published prompt at request time, so prompt iteration is independent of deploy cadence. Every call is traced — token counts, model, tool steps, latency — for cost accounting and offline eval.

Rate limits & quotas

Per-user daily call cap (default 25), UTC midnight reset, entitlement-gated.

Read the full write-up on Orbital: the reinforcing evals loop