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.

Mirror SDK

Mirroring and projection operations.

Operations

MethodDescription
lucidGetAgentReceiptsGet agent receipts
lucidGetAgentEpochGet agent current epoch
lucidGetAgentProofGet agent latest proof
lucidGetAgentRunProofGet proof for specific run

Generated Reference

Overview

Available Operations

lucidGetAgentReceipts

Paginated receipts filtered by agent passport ID. Admin auth required.

Example Usage

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

const raijinLabsLucidAi = new RaijinLabsLucidAi();

async function run() {
  const result = await raijinLabsLucidAi.agents.mirror.lucidGetAgentReceipts({
    adminAuth: process.env["RAIJINLABSLUCIDAI_ADMIN_AUTH"] ?? "",
  }, {
    passportId: "<id>",
  });

  for await (const page of result) {
    console.log(page);
  }
}

run();

Standalone function

The standalone function version of this method:
import { RaijinLabsLucidAiCore } from "raijin-labs-lucid-ai/core.js";
import { agentsMirrorLucidGetAgentReceipts } from "raijin-labs-lucid-ai/funcs/agentsMirrorLucidGetAgentReceipts.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 agentsMirrorLucidGetAgentReceipts(raijinLabsLucidAi, {
    adminAuth: process.env["RAIJINLABSLUCIDAI_ADMIN_AUTH"] ?? "",
  }, {
    passportId: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    for await (const page of result) {
    console.log(page);
  }
  } else {
    console.log("agentsMirrorLucidGetAgentReceipts failed:", res.error);
  }
}

run();

Parameters

ParameterTypeRequiredDescription
requestoperations.LucidGetAgentReceiptsRequest:heavy_check_mark:The request object to use for the request.
securityoperations.LucidGetAgentReceiptsSecurity:heavy_check_mark:The security requirements to use for the request.
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.LucidGetAgentReceiptsResponse>

Errors

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

lucidGetAgentEpoch

Get the current open epoch for an agent. Checks both in-memory state and database for coverage across restarts.

Example Usage

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

const raijinLabsLucidAi = new RaijinLabsLucidAi();

async function run() {
  const result = await raijinLabsLucidAi.agents.mirror.lucidGetAgentEpoch({
    adminAuth: process.env["RAIJINLABSLUCIDAI_ADMIN_AUTH"] ?? "",
  }, {
    passportId: "<id>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:
import { RaijinLabsLucidAiCore } from "raijin-labs-lucid-ai/core.js";
import { agentsMirrorLucidGetAgentEpoch } from "raijin-labs-lucid-ai/funcs/agentsMirrorLucidGetAgentEpoch.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 agentsMirrorLucidGetAgentEpoch(raijinLabsLucidAi, {
    adminAuth: process.env["RAIJINLABSLUCIDAI_ADMIN_AUTH"] ?? "",
  }, {
    passportId: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("agentsMirrorLucidGetAgentEpoch failed:", res.error);
  }
}

run();

Parameters

ParameterTypeRequiredDescription
requestoperations.LucidGetAgentEpochRequest:heavy_check_mark:The request object to use for the request.
securityoperations.LucidGetAgentEpochSecurity:heavy_check_mark:The security requirements to use for the request.
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.LucidGetAgentEpochResponse>

Errors

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

lucidGetAgentProof

Get the latest MMR proof for an agent (most recent anchored epoch).

Example Usage

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

const raijinLabsLucidAi = new RaijinLabsLucidAi();

async function run() {
  const result = await raijinLabsLucidAi.agents.mirror.lucidGetAgentProof({
    adminAuth: process.env["RAIJINLABSLUCIDAI_ADMIN_AUTH"] ?? "",
  }, {
    passportId: "<id>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:
import { RaijinLabsLucidAiCore } from "raijin-labs-lucid-ai/core.js";
import { agentsMirrorLucidGetAgentProof } from "raijin-labs-lucid-ai/funcs/agentsMirrorLucidGetAgentProof.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 agentsMirrorLucidGetAgentProof(raijinLabsLucidAi, {
    adminAuth: process.env["RAIJINLABSLUCIDAI_ADMIN_AUTH"] ?? "",
  }, {
    passportId: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("agentsMirrorLucidGetAgentProof failed:", res.error);
  }
}

run();

Parameters

ParameterTypeRequiredDescription
requestoperations.LucidGetAgentProofRequest:heavy_check_mark:The request object to use for the request.
securityoperations.LucidGetAgentProofSecurity:heavy_check_mark:The security requirements to use for the request.
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.AgentProof>

Errors

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

lucidGetAgentRunProof

Get proof details for a specific run_id (leaf-level proof with receipt data).

Example Usage

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

const raijinLabsLucidAi = new RaijinLabsLucidAi();

async function run() {
  const result = await raijinLabsLucidAi.agents.mirror.lucidGetAgentRunProof({
    adminAuth: process.env["RAIJINLABSLUCIDAI_ADMIN_AUTH"] ?? "",
  }, {
    passportId: "<id>",
    runId: "<id>",
  });

  console.log(result);
}

run();

Standalone function

The standalone function version of this method:
import { RaijinLabsLucidAiCore } from "raijin-labs-lucid-ai/core.js";
import { agentsMirrorLucidGetAgentRunProof } from "raijin-labs-lucid-ai/funcs/agentsMirrorLucidGetAgentRunProof.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 agentsMirrorLucidGetAgentRunProof(raijinLabsLucidAi, {
    adminAuth: process.env["RAIJINLABSLUCIDAI_ADMIN_AUTH"] ?? "",
  }, {
    passportId: "<id>",
    runId: "<id>",
  });
  if (res.ok) {
    const { value: result } = res;
    console.log(result);
  } else {
    console.log("agentsMirrorLucidGetAgentRunProof failed:", res.error);
  }
}

run();

Parameters

ParameterTypeRequiredDescription
requestoperations.LucidGetAgentRunProofRequest:heavy_check_mark:The request object to use for the request.
securityoperations.LucidGetAgentRunProofSecurity:heavy_check_mark:The security requirements to use for the request.
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.AgentRunProof>

Errors

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