> ## Documentation Index
> Fetch the complete documentation index at: https://docs.cybr.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> These docs cover learner integrations through Hosted Lab Pages, the SDK, and the REST API. Content management is outside this integration scope.
> Read the setup page for the chosen approach before implementing it. Keep organization API keys and hosted mint secrets on the server.
> The public SDK is coming soon. Check the SDK quickstart for current availability. Do not invent installation commands or direct readers to a private package.
> Cybr provides completion tracking and CTF verification. The integrating platform decides whether to award points.

# Lab guides and CTF

> Show lab content and submit answers through the SDK.

## Read lab content

`labs.list()` includes `hasGuide` and `hasResources`. `labs.get()` returns the full content:

```ts theme={null}
const lab = await cybr.labs.get(labId, { learnerId })
const guide = lab.guide
```

The SDK includes the public content types. The guide does not contain accepted knowledge-check answers.

## Show the guide

A guide contains these fields:

| Field | Content |
| - | - |
| `version` | Guide format version, currently `1` |
| `objectives` | Learning objectives |
| `scenario` | Scenario Markdown |
| `tasks` | Ordered tasks |
| `completion` | Optional closing title and Markdown body |

Each task has an `id`, `title`, `body`, `question`, and `flag`. The `body` contains Markdown.

A question can use `text` or `true_false`. An absent question type means `text`. A task with `flag: true` accepts a CTF flag.

Show the objectives, scenario, tasks, and closing section in order. Sanitize Markdown and embedded content before display.

The SDK supplies data. Your application supplies the interface.

## Grade a guide answer

```ts theme={null}
const result = await cybr.labs.submitGuideAnswer({
  labId,
  taskId,
  answer,
  learnerId
})
```

The answer accepts a string or boolean. True/false questions accept booleans or the strings `true` and `false`.

| SDK verdict | `correct` | Meaning |
| - | - | - |
| `CORRECT_ANSWER` | `true` | The answer matches |
| `INCORRECT_ANSWER` | `false` | The answer does not match |
| `NO_QUESTION` | `false` | The task has no question |

Guide grading does not record overall lab completion. The API currently does not use the optional `learnerId` for guide grading.

## Submit a CTF flag

```ts theme={null}
const result = await cybr.labs.submitFlag({ labId, learnerId, flag })
```

| SDK verdict | `correct` | Meaning |
| - | - | - |
| `CORRECT_FLAG` | `true` | The flag matches and completion is recorded |
| `INCORRECT_FLAG` | `false` | The flag does not match |
| `NOT_CTF` | `false` | The lab has no CTF flag |

Cybr compares flags without case sensitivity. The [completion guide](/guides/completion-and-scoring) explains verification results and learner progress.

## Other lab content

The detail response can include resource links, diagrams, videos, banners, and writeups. Optional fields depend on the lab.

Diagram `kind` identifies an image or HTML document. HTML diagrams require a sandboxed iframe. Unknown video providers can be skipped without hiding the guide.

The [SDK reference](/reference/labs-and-deployments) lists content types and discussion methods. The [REST reference](/api-reference/overview) describes the HTTP shapes.
