Decision: Python + LangGraph for orchestration, not a visual workflow tool.
Rationale: Client health assessment requires genuine reasoning over unstructured signals — compound-pattern detection cannot be pre-written as workflow branches.
Trade-off: Higher build complexity in exchange for real agentic capability rather than simulated automation.
Decision: llama-3.1-8b-instant for summarization and classification; llama-3.3-70b-versatile for scoring, diagnosis, and drafting.
Rationale: Summarization and classification are the highest-volume calls and don't require deep reasoning. Splitting them onto a separate model with a separate quota roughly triples effective daily capacity on Groq's free tier.
Trade-off: Two client instances and two sets of retry/backoff logic to maintain instead of one — solved by sharing the underlying retry machinery between both.
Decision: One row per communication event in sentinel_raw_events, never a per-client-per-day blended record.
Rationale: Daily aggregation destroys exactly the compound-pattern detection the Health Scorer depends on — a day containing one positive call and one hostile email must arrive as two distinct rows, not one averaged paragraph. Event grain is also the only level idempotency is checkable at.
Trade-off: More rows, more complex query patterns — solved with four targeted indexes matched to actual access patterns (unprocessed-per-client, timeline, source-filtered, idempotency).
Decision: A dedicated sentinel_client_identity_map table with a UNIQUE(identifier_type, identifier_value) constraint, plus an unmatched-events queue rather than best-guess attribution.
Rationale: A wrong client attribution silently poisons two health scores at once. Making ambiguity structurally impossible at the database level, and routing anything unresolved to a human-reviewed queue, was judged safer than any inference-based matching.
Trade-off: Real emails require manual onboarding (roughly one hour of account manager time for an 8-client firm) before the map is fully populated — accepted as a one-time cost against permanent attribution safety.