# Getting Started

The library has been configured to work in multiple environments:

* UMD (Browser)
* ESM (Client-side applications)

### UMD (Browser)

```markup
<script src="https://unpkg.com/@xapi/cmi5"><script>

<script type="text/javascript">
  // Create Cmi5 instance
  const cmi5 = new Cmi5();

  // Initialize AU
  cmi5.initialize();
<script>
```

### ES module (Client-side applications)

For client-side applications built using imports, an ES Module is available for you to install and `import`  into your project.

```bash
npm i @xapi/cmi5 --save
```

```typescript
import Cmi5 from "@xapi/cmi5";

// Create Cmi5 instance
const cmi5: Cmi5 = new Cmi5();

// Initialize AU
cmi5.initialize();
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://www.xapijs.dev/cmi5-profile-library/getting-started.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
