Skip to content
docs
UseBuildChangelog
Open Lumin

Examples

health-risk-analyzer

The deepest of the nine apps: a structured, prevention-oriented risk read across 8 body systems, meant to complement real screening rather than replace it. Built for integrative medicine clinics, telehealth apps, corporate wellness platforms and Ayurvedic chains.

Tool chain

Around 29 tools across a 7-step protocol. Chart foundation runs first: set_birth_profile, get_full_chart, get_planets, get_house_cusps, get_nakshatra_details, get_aspects_and_strength, then run_pre_verdict_audit as a single chart-integrity gate bundling boundary, combustion, planetary war and vargottama.

Promise and significators: analyze_natal_promise, get_significators (the 4-level house-signification matrix that grounds every "planet that signifies 6/8/12" claim), get_multi_system_verdict (4-school consensus for chronic-illness and surgery verdicts), get_bhadhakasthana, get_csl_advanced.

Timing and transit: get_smart_current_dasha, get_dasha_periods, get_vedha_transit (Saturn/Jupiter transit favourability from the natal Moon, the trigger that turns a latent dasha vulnerability into a peak window), get_medical_timing, get_ashtakavarga, get_shadbala.

Health family: get_chronic_disease_panel (8 conditions, each with a 0-100 signature score and watch-decade dasha periods), get_health_organ_panel (sign-to-body-region affliction map), get_accident_window, get_longevity_balarishta, get_sade_sati_phases, get_sade_sati_intensity, get_ayurvedic_constitution, and get_oncology_timing conditionally, only when the question or the chart raises it.

Divisional corroboration: get_d6_chart, get_d8_chart, get_d30_chart, the disease, longevity and mind charts.

Inputs

  • name, birth_date, birth_time, birth_time_known
  • location_name, free text, resolved by the model
  • biological_sex, optional

Birth-time fallback

With birth_time_known: false the prompt skips ascendant-derived analysis (1st cusp CSL, lagna-lord vitality) and leans on planetary placement, Moon nakshatra and dasha, which is Moon-driven and works without an exact time. The vitality index loses roughly 15 points of confidence in this mode, and the constitutional notes flag it.

Call it

typescript
const result = await runLumin({
  allowedTools: ALLOWED_TOOLS, // the ~29 tools above
  system: buildSystemPrompt(),
  user: buildUserPrompt(input),
  maxTokens: 16000,
  effort: "xhigh",
  signal: req.signal,
});

const parsed = ensureShape(
  parseJsonBlock<AnalysisResponse>(result.text),
  validateShape,
);

The route sets a 180 second maxDuration to accommodate the tool count; a typical run finishes in 60 to 150 seconds.

Response shape

json
{
  "resolved_location": { "latitude": 6.9271, "longitude": 79.8612, "utc_offset_minutes": 330, "note": "Colombo, Sri Lanka" },
  "vitality_index": { "score": 62, "label": "balanced", "summary": "Moderate constitutional resilience, tempered by an approaching Sade Sati window." },
  "chart_confidence": { "band": "moderate", "modifier": -10, "summary": "One CRITICAL boundary flag on the 6th cusp sub lord." },
  "constitutional_basis": {
    "ascendant": "Scorpio", "ascendant_lord": "Mars", "ascendant_lord_strength": 58.2,
    "moon_sign": "Cancer", "moon_nakshatra": "Pushya", "active_dasha": "Jupiter-Saturn",
    "notes": "Pitta-Vata leaning prakriti."
  },
  "chronicity_profile": { "tendency": "chronic", "reasoning": "Saturn signifying 6th and 12th with sub-lord backing." },
  "system_risks": [
    {
      "system": "musculoskeletal", "risk_level": "elevated", "severity_score": 61,
      "primary_indicators": ["Saturn in 10th, signifying 6th and 8th"],
      "peak_window": { "start": "2027-03-01", "end": "2027-09-15", "trigger": "Saturn favourable-to-adverse transit reversal, get_vedha_transit" },
      "preventive_focus": "Joint mobility and load management"
    }
  ],
  "organ_panel": { "highest_risk_region": "Lower back and joints", "summary": "...", "regions": [] },
  "saturn_cycle": { "status": "approaching", "phase": "rising", "window": { "start": "2027-01-10", "end": "2029-07-20" }, "note": "...", "intensity": 72, "peak_theme": "structural stress peak" },
  "surgery_windows": [],
  "recovery_periods": [],
  "screening_calendar": [
    { "month": "2027-04", "test": "Bone density scan", "system": "musculoskeletal", "rationale": "Saturn peak-window overlap" }
  ],
  "disclaimer": "A supplementary lens, not diagnostic. Discuss any elevated or high finding with a qualified physician."
}

Screens

  • A clinical intake form: name, date and time of birth with an unknown-time toggle, birth city, biological sex
  • A vitality dashboard with the chart-confidence pill from run_pre_verdict_audit
  • An 8-card body-system risk grid
  • A body-region panel from the organ scan
  • A timeline card carrying the Saturn cycle and peak-intensity meter
  • A screening calendar with 3 to 6 dated, rationale-carrying entries
  • A disclaimer banner rendered on every result, not just the first

The interesting engineering detail

get_vedha_transit is what turns a latent dasha vulnerability into a dated peak window. Without it, the prompt would have to assert a transit trigger from memory, which is exactly the kind of unsourced claim the platform's score-provenance discipline exists to prevent. Every peak_window.trigger in the response names the tool call it came from, so a clinician reviewing the output can trace the claim back to a specific KP rule (Saturn favourable in 3/6/11, Jupiter in 2/5/7/9/11, read from the natal Moon) rather than trusting a sentence.

Where to next