# Actor

## Overview

The **Actor** object is a base model that is used to represent both *users* ([**Agents**](/clear-api-reference/data-model/actor.md#agent)) and *groups* ([**Groups**](/clear-api-reference/data-model/actor.md#group)) as defined by the **Experience API**. In cases where an operation can be performed on either a user or a group, an **Actor** object is accepted by the **Clear API**.

In addition to the base xAPI properties of an Actor, this page will outline additional extensions defined by the Clear API that convey special meaning within the platform.

{% hint style="info" %}
See the Experience API specification for more details:\
[**https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Data.md#actor**](https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Data.md#actor)
{% endhint %}

## Agent

### Example

Users are represented by an Actor object of *Agent* type as shown below:

```javascript
{
  "objectType": "Agent",
  "account": {
    "homePage": "https://organisation.clearlrs.com",
    "name": "uuid"
  },
  "name": "John Smith",
  "extensions": {
    "http://clearlrs.com/api/ext/agent/attributes": {
      "Country": "Australia",
      "Department": "Sales",
      "Position Title": "Team Lead"
    }
  }
}
```

### Reference

| Field        | Description                                                                                                                                                                                                    |
| ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `objectType` | The type of **Actor** – must be `"Agent"` for users.                                                                                                                                                           |
| `account`    | Unique identifier for this agent (or any other valid IFI as defined in the [**xAPI specification**](https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Data.md#inversefunctional)).                          |
| `name`       | Display name for the user. Separate given and surnames may be recorded in the attributes extension, if desired.                                                                                                |
| `extensions` | Open object for any valid xAPI extensions, see the [**xAPI specification**](https://github.com/adlnet/xAPI-Spec/blob/master/xAPI-Data.md#miscext) and the Extensions table below for Clear-defined extensions. |

#### Extensions

| Field                                                                                                | Description                                                                                                                                               |
| ---------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| <p><strong>Agent</strong></p><p><code><http://clearlrs.com/api/ext/agent></code></p>                 | <p>Status metadata about the agent including creation, activation and sync dates.</p><p><strong>Read-only</strong></p>                                    |
| <p><strong>Attributes</strong></p><p><code><http://clearlrs.com/api/ext/agent/attributes></code></p> | Arbitrary user profile metadata that take the form of key-value pairs. These attributes can then be used for filtering, reporting and assigning training. |
| <p><strong>Groups</strong></p><p><code><https://clearlrs.com/api/ext/agent/groups></code></p>        | <p>Any <strong>Groups</strong> the user has been assigned to in the form of an Array of Actor objects.</p><p><strong>Read-only</strong></p>               |


---

# 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://dev.clearxp.com/clear-api-reference/data-model/actor.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.
