Install tooling
CLI (optional: keys, login, MCP config):Authenticate in your service
Use an API key with at leastsdk:event-log and api:manage-patients for creating patients and logging. Create the key in the Console or with olira keys create (see the CLI key commands). Store it in a secret manager and pass it at runtime:
Initialize the SDK and create patients
Single patient
Multiple patients
Usecreate_patients_batch to register up to 500 patients in one POST /v1/patients/batch call. Pass a list of CreatePatientRequest objects; the response is a PatientBatchResult with items (successes, each with index and id) and errors (failures per index); partial success is supported.
create_patient. Anchor rules and field shapes match CreatePatientRequest in the Python SDK reference.
Log data
Useolira.log() or olira.log_batch() to send structured logs: an OliraLogType and a payload that matches each log type (see the log types catalog). Use the correct patient_id for each log, whether you run one patient or many.
OliraTrace links a log to an object in your system (conversation id, questionnaire id, etc.) for provenance in observability and when reading state later.

