Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.lucid.foundation/llms.txt

Use this file to discover all available pages before exploring further.

Health SDK

System health — liveness, readiness, and per-dependency status checks

Operations

MethodDescription
lucidCheckSystemHealthOverall system health
lucidCheckLivenessLiveness probe
lucidCheckReadinessReadiness probe
lucidCheckDatabaseHealthDatabase health check
lucidCheckRedisHealthRedis health check
lucidCheckNangoHealthNango service health check
lucidGetDetailedHealthDetailed health with statistics

Generated Reference

Overview

System health — liveness, readiness, and per-dependency status checks

Available Operations

lucidCheckSystemHealth

Check overall system health including all dependencies (database, Redis, Solana, Nango). Returns healthy, degraded, or down status with a 200 when healthy or 503 when degraded/down. Use /health/detailed for resource metrics.

Example Usage

import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";

const raijinLabsLucidAi = new RaijinLabsLucidAi();

async function run() {
  const result = await raijinLabsLucidAi.health.lucidCheckSystemHealth();

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:
import { RaijinLabsLucidAiCore } from "raijin-labs-lucid-ai/core.js";
import { healthLucidCheckSystemHealth } from "raijin-labs-lucid-ai/funcs/healthLucidCheckSystemHealth.js";

// Use `RaijinLabsLucidAiCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const raijinLabsLucidAi = new RaijinLabsLucidAiCore();

async function run() {
  const res = await healthLucidCheckSystemHealth(raijinLabsLucidAi);
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("healthLucidCheckSystemHealth failed:", res.error);
  }
}

run();

Parameters

ParameterTypeRequiredDescription
optionsRequestOptions:heavy_minus_sign:Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit:heavy_minus_sign:Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig:heavy_minus_sign:Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.SystemHealth>

Errors

Error TypeStatus CodeContent Type
errors.SystemHealthError503application/json
errors.RaijinLabsLucidAiDefaultError4XX, 5XX*/*

lucidCheckLiveness

Kubernetes-compatible liveness probe. Returns 200 if the application process is alive. Does not check dependencies. Use /health/ready for full readiness.

Example Usage

import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";

const raijinLabsLucidAi = new RaijinLabsLucidAi();

async function run() {
  const result = await raijinLabsLucidAi.health.lucidCheckLiveness();

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:
import { RaijinLabsLucidAiCore } from "raijin-labs-lucid-ai/core.js";
import { healthLucidCheckLiveness } from "raijin-labs-lucid-ai/funcs/healthLucidCheckLiveness.js";

// Use `RaijinLabsLucidAiCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const raijinLabsLucidAi = new RaijinLabsLucidAiCore();

async function run() {
  const res = await healthLucidCheckLiveness(raijinLabsLucidAi);
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("healthLucidCheckLiveness failed:", res.error);
  }
}

run();

Parameters

ParameterTypeRequiredDescription
optionsRequestOptions:heavy_minus_sign:Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit:heavy_minus_sign:Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig:heavy_minus_sign:Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.LucidCheckLivenessResponse>

Errors

Error TypeStatus CodeContent Type
errors.RaijinLabsLucidAiDefaultError4XX, 5XX*/*

lucidCheckReadiness

Kubernetes-compatible readiness probe. Checks all dependencies (database, Redis, etc.) and returns 200 only when the service is ready to accept traffic. Returns 503 with dependency status details when not ready.

Example Usage

import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";

const raijinLabsLucidAi = new RaijinLabsLucidAi();

async function run() {
  const result = await raijinLabsLucidAi.health.lucidCheckReadiness();

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:
import { RaijinLabsLucidAiCore } from "raijin-labs-lucid-ai/core.js";
import { healthLucidCheckReadiness } from "raijin-labs-lucid-ai/funcs/healthLucidCheckReadiness.js";

// Use `RaijinLabsLucidAiCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const raijinLabsLucidAi = new RaijinLabsLucidAiCore();

async function run() {
  const res = await healthLucidCheckReadiness(raijinLabsLucidAi);
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("healthLucidCheckReadiness failed:", res.error);
  }
}

run();

Parameters

ParameterTypeRequiredDescription
optionsRequestOptions:heavy_minus_sign:Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit:heavy_minus_sign:Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig:heavy_minus_sign:Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.LucidCheckReadinessResponse>

Errors

Error TypeStatus CodeContent Type
errors.ServiceUnavailableError503application/json
errors.RaijinLabsLucidAiDefaultError4XX, 5XX*/*

lucidCheckDatabaseHealth

Check database (PostgreSQL/Supabase) connectivity and query latency. Returns 503 when the database is unreachable.

Example Usage

import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";

const raijinLabsLucidAi = new RaijinLabsLucidAi();

async function run() {
  const result = await raijinLabsLucidAi.health.lucidCheckDatabaseHealth();

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:
import { RaijinLabsLucidAiCore } from "raijin-labs-lucid-ai/core.js";
import { healthLucidCheckDatabaseHealth } from "raijin-labs-lucid-ai/funcs/healthLucidCheckDatabaseHealth.js";

// Use `RaijinLabsLucidAiCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const raijinLabsLucidAi = new RaijinLabsLucidAiCore();

async function run() {
  const res = await healthLucidCheckDatabaseHealth(raijinLabsLucidAi);
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("healthLucidCheckDatabaseHealth failed:", res.error);
  }
}

run();

Parameters

ParameterTypeRequiredDescription
optionsRequestOptions:heavy_minus_sign:Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit:heavy_minus_sign:Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig:heavy_minus_sign:Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.HealthCheckResult>

Errors

Error TypeStatus CodeContent Type
errors.HealthCheckResultError503application/json
errors.RaijinLabsLucidAiDefaultError4XX, 5XX*/*

lucidCheckRedisHealth

Check Redis connectivity and latency. Redis is used for spent proof deduplication and caching. Returns 503 when Redis is unreachable.

Example Usage

import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";

const raijinLabsLucidAi = new RaijinLabsLucidAi();

async function run() {
  const result = await raijinLabsLucidAi.health.lucidCheckRedisHealth();

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:
import { RaijinLabsLucidAiCore } from "raijin-labs-lucid-ai/core.js";
import { healthLucidCheckRedisHealth } from "raijin-labs-lucid-ai/funcs/healthLucidCheckRedisHealth.js";

// Use `RaijinLabsLucidAiCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const raijinLabsLucidAi = new RaijinLabsLucidAiCore();

async function run() {
  const res = await healthLucidCheckRedisHealth(raijinLabsLucidAi);
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("healthLucidCheckRedisHealth failed:", res.error);
  }
}

run();

Parameters

ParameterTypeRequiredDescription
optionsRequestOptions:heavy_minus_sign:Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit:heavy_minus_sign:Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig:heavy_minus_sign:Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.HealthCheckResult>

Errors

Error TypeStatus CodeContent Type
errors.HealthCheckResultError503application/json
errors.RaijinLabsLucidAiDefaultError4XX, 5XX*/*

lucidCheckNangoHealth

Check Nango OAuth service connectivity. Nango manages third-party OAuth connections for agent integrations. Returns 503 when Nango is unreachable.

Example Usage

import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";

const raijinLabsLucidAi = new RaijinLabsLucidAi();

async function run() {
  const result = await raijinLabsLucidAi.health.lucidCheckNangoHealth();

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:
import { RaijinLabsLucidAiCore } from "raijin-labs-lucid-ai/core.js";
import { healthLucidCheckNangoHealth } from "raijin-labs-lucid-ai/funcs/healthLucidCheckNangoHealth.js";

// Use `RaijinLabsLucidAiCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const raijinLabsLucidAi = new RaijinLabsLucidAiCore();

async function run() {
  const res = await healthLucidCheckNangoHealth(raijinLabsLucidAi);
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("healthLucidCheckNangoHealth failed:", res.error);
  }
}

run();

Parameters

ParameterTypeRequiredDescription
optionsRequestOptions:heavy_minus_sign:Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit:heavy_minus_sign:Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig:heavy_minus_sign:Enables retrying HTTP requests under certain failure conditions.

Response

Promise<models.HealthCheckResult>

Errors

Error TypeStatus CodeContent Type
errors.HealthCheckResultError503application/json
errors.RaijinLabsLucidAiDefaultError4XX, 5XX*/*

lucidGetDetailedHealth

Detailed health check including system resources (memory, CPU), per-dependency status, version info, environment, and aggregate statistics. Use this for operational dashboards and monitoring.

Example Usage

import { RaijinLabsLucidAi } from "raijin-labs-lucid-ai";

const raijinLabsLucidAi = new RaijinLabsLucidAi();

async function run() {
  const result = await raijinLabsLucidAi.health.lucidGetDetailedHealth();

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:
import { RaijinLabsLucidAiCore } from "raijin-labs-lucid-ai/core.js";
import { healthLucidGetDetailedHealth } from "raijin-labs-lucid-ai/funcs/healthLucidGetDetailedHealth.js";

// Use `RaijinLabsLucidAiCore` for best tree-shaking performance.
// You can create one instance of it to use across an application.
const raijinLabsLucidAi = new RaijinLabsLucidAiCore();

async function run() {
  const res = await healthLucidGetDetailedHealth(raijinLabsLucidAi);
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("healthLucidGetDetailedHealth failed:", res.error);
  }
}

run();

Parameters

ParameterTypeRequiredDescription
optionsRequestOptions:heavy_minus_sign:Used to set various options for making HTTP requests.
options.fetchOptionsRequestInit:heavy_minus_sign:Options that are passed to the underlying HTTP request. This can be used to inject extra headers for examples. All Request options, except method and body, are allowed.
options.retriesRetryConfig:heavy_minus_sign:Enables retrying HTTP requests under certain failure conditions.

Response

Promise<operations.LucidGetDetailedHealthResponse>

Errors

Error TypeStatus CodeContent Type
errors.ErrorResponse500application/json
errors.RaijinLabsLucidAiDefaultError4XX, 5XX*/*