> ## 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.

# Mirror SDK

Mirroring and projection operations.

## Operations

| Method                  | Description                |
| ----------------------- | -------------------------- |
| `lucidGetAgentReceipts` | Get agent receipts         |
| `lucidGetAgentEpoch`    | Get agent current epoch    |
| `lucidGetAgentProof`    | Get agent latest proof     |
| `lucidGetAgentRunProof` | Get proof for specific run |

## Generated Reference

### Overview

#### Available Operations

* [lucidGetAgentReceipts](#lucidgetagentreceipts) - Get agent receipts
* [lucidGetAgentEpoch](#lucidgetagentepoch) - Get agent current epoch
* [lucidGetAgentProof](#lucidgetagentproof) - Get agent latest proof
* [lucidGetAgentRunProof](#lucidgetagentrunproof) - Get proof for specific run

### lucidGetAgentReceipts

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

#### Example Usage

```typescript theme={null}
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:

```typescript theme={null}
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

| Parameter              | Type                                                                                                                                                               | Required             | Description                                                                                                                                                                    |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request`              | [operations.LucidGetAgentReceiptsRequest](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/operations/lucidgetagentreceiptsrequest.md)   | :heavy\_check\_mark: | The request object to use for the request.                                                                                                                                     |
| `security`             | [operations.LucidGetAgentReceiptsSecurity](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/operations/lucidgetagentreceiptssecurity.md) | :heavy\_check\_mark: | The security requirements to use for the request.                                                                                                                              |
| `options`              | RequestOptions                                                                                                                                                     | :heavy\_minus\_sign: | Used to set various options for making HTTP requests.                                                                                                                          |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options)                                                                            | :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.retries`      | [RetryConfig](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/lib/utils/retryconfig.md)                                                        | :heavy\_minus\_sign: | Enables retrying HTTP requests under certain failure conditions.                                                                                                               |

#### Response

**Promise\<[operations.LucidGetAgentReceiptsResponse](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/operations/lucidgetagentreceiptsresponse.md)>**

#### Errors

| Error Type                           | Status Code | Content Type     |
| ------------------------------------ | ----------- | ---------------- |
| errors.ErrorResponse                 | 401         | application/json |
| errors.ErrorResponse                 | 500         | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX    | \*/\*            |

### lucidGetAgentEpoch

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

#### Example Usage

```typescript theme={null}
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:

```typescript theme={null}
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

| Parameter              | Type                                                                                                                                                         | Required             | Description                                                                                                                                                                    |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request`              | [operations.LucidGetAgentEpochRequest](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/operations/lucidgetagentepochrequest.md)   | :heavy\_check\_mark: | The request object to use for the request.                                                                                                                                     |
| `security`             | [operations.LucidGetAgentEpochSecurity](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/operations/lucidgetagentepochsecurity.md) | :heavy\_check\_mark: | The security requirements to use for the request.                                                                                                                              |
| `options`              | RequestOptions                                                                                                                                               | :heavy\_minus\_sign: | Used to set various options for making HTTP requests.                                                                                                                          |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options)                                                                      | :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.retries`      | [RetryConfig](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/lib/utils/retryconfig.md)                                                  | :heavy\_minus\_sign: | Enables retrying HTTP requests under certain failure conditions.                                                                                                               |

#### Response

**Promise\<[operations.LucidGetAgentEpochResponse](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/operations/lucidgetagentepochresponse.md)>**

#### Errors

| Error Type                           | Status Code | Content Type     |
| ------------------------------------ | ----------- | ---------------- |
| errors.ErrorResponse                 | 401         | application/json |
| errors.ErrorResponse                 | 500         | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX    | \*/\*            |

### lucidGetAgentProof

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

#### Example Usage

```typescript theme={null}
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:

```typescript theme={null}
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

| Parameter              | Type                                                                                                                                                         | Required             | Description                                                                                                                                                                    |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request`              | [operations.LucidGetAgentProofRequest](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/operations/lucidgetagentproofrequest.md)   | :heavy\_check\_mark: | The request object to use for the request.                                                                                                                                     |
| `security`             | [operations.LucidGetAgentProofSecurity](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/operations/lucidgetagentproofsecurity.md) | :heavy\_check\_mark: | The security requirements to use for the request.                                                                                                                              |
| `options`              | RequestOptions                                                                                                                                               | :heavy\_minus\_sign: | Used to set various options for making HTTP requests.                                                                                                                          |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options)                                                                      | :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.retries`      | [RetryConfig](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/lib/utils/retryconfig.md)                                                  | :heavy\_minus\_sign: | Enables retrying HTTP requests under certain failure conditions.                                                                                                               |

#### Response

**Promise\<[models.AgentProof](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/agentproof.md)>**

#### Errors

| Error Type                           | Status Code | Content Type     |
| ------------------------------------ | ----------- | ---------------- |
| errors.ErrorResponse                 | 401, 404    | application/json |
| errors.ErrorResponse                 | 500         | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX    | \*/\*            |

### lucidGetAgentRunProof

Get proof details for a specific run\_id (leaf-level proof with receipt data).

#### Example Usage

```typescript theme={null}
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:

```typescript theme={null}
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

| Parameter              | Type                                                                                                                                                               | Required             | Description                                                                                                                                                                    |
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `request`              | [operations.LucidGetAgentRunProofRequest](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/operations/lucidgetagentrunproofrequest.md)   | :heavy\_check\_mark: | The request object to use for the request.                                                                                                                                     |
| `security`             | [operations.LucidGetAgentRunProofSecurity](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/operations/lucidgetagentrunproofsecurity.md) | :heavy\_check\_mark: | The security requirements to use for the request.                                                                                                                              |
| `options`              | RequestOptions                                                                                                                                                     | :heavy\_minus\_sign: | Used to set various options for making HTTP requests.                                                                                                                          |
| `options.fetchOptions` | [RequestInit](https://developer.mozilla.org/en-US/docs/Web/API/Request/Request#options)                                                                            | :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.retries`      | [RetryConfig](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/lib/utils/retryconfig.md)                                                        | :heavy\_minus\_sign: | Enables retrying HTTP requests under certain failure conditions.                                                                                                               |

#### Response

**Promise\<[models.AgentRunProof](https://github.com/lucid-fdn/lucid-ai-sdk/blob/main/typescript/docs/models/agentrunproof.md)>**

#### Errors

| Error Type                           | Status Code | Content Type     |
| ------------------------------------ | ----------- | ---------------- |
| errors.ErrorResponse                 | 401, 404    | application/json |
| errors.ErrorResponse                 | 500         | application/json |
| errors.RaijinLabsLucidAiDefaultError | 4XX, 5XX    | \*/\*            |
