A little context
goes a long way.

Understand the foundations of Calyra.
Start with the concepts. Explore the details with us.

The layer before the model.

Calyra is a clinical context compiler. It prepares structured inputs for AI applications from fragmented clinical data, using explicit specifications, token budgets, and configured validation rules.

Clinical recordsContextSpec + compilerContext bundle

The compiler is designed as a neutral layer between data sources and downstream models or agents. A bundle carries both its selected information and the record of how it was prepared.

Describe what matters.

A ContextSpec is a declarative YAML or JSON definition of the sources, selection rules, required facts, and limits for a workflow. This illustrative spec is based on the repository’s discharge summary example.

version: "0.2"
meta:
  id: discharge-summary-draft:v2
  owner: cardiology-team

budgets:
  tokens_max: 24000
  recency_days: 365

sources:
  - fhir: { resource: "Observation", profile: "lab" }
  - fhir: { resource: "MedicationStatement", active_only: true }

include:
  labs:
    select: [Creatinine, eGFR]
    require_latest: true
  medications:
    active_only: true

guards:
  must_include: [last_Creatinine, last_eGFR]
  forbid: [PII.patient_address, PII.phone_number]

outputs:
  schema: DischargeContext@1.1
  redaction: [direct_identifiers]
Explore a synthetic example

Six passes. Explicit decisions.

Each stage has a distinct responsibility. Together they turn source records into a bounded, inspectable context.

Normalize

Convert source records into a consistent internal representation. This gives downstream passes a shared structure for working with observations, medications, and other records.

Dedupe

Identify duplicate information before it consumes the context budget. Record removal decisions in provenance so the transformation can be inspected.

Rank

Score records for the requested task using relevance and recency. Ranking defines the order in which information is considered for the bundle.

Pack

Assemble the ranked records within the specified token budget. The context’s required information remains a condition for validation.

Guard

Evaluate the selected context against configured rules, including required records and forbidden identifiers. Review failures before using the result downstream.

Emit

Produce structured output, a guard report, and a provenance graph. These outputs let an application consume the context and a reviewer inspect its construction.

Make the process inspectable.

Guards

Configured checks express expectations about a bundle. A rule can require a recent renal observation or forbid a direct identifier. Guard results should be reviewed as part of workflow validation.

Provenance

The transformation graph records the path from source records to output. Use it to investigate decisions about normalization, selection, and removal.

Intention, before automation.

Make requirements explicit. Keep context bounded. Preserve an inspectable trace. Design for human review. These principles guide the compiler and the applications built around it.

Calyra’s controls support a broader security and validation program. Deployment-specific access control, governance, and compliance requirements still need to be evaluated with the team operating the system.

Building something specific?

The public guide covers the foundations. A private walkthrough is the best place to discuss your workflow and integration requirements.

Request a demo