> For the complete documentation index, see [llms.txt](https://www.xapijs.dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.xapijs.dev/xapi-wrapper-library/agents-resource.md).

# Agents Resource

## getAgent

Gets all agents used by a single person.

### **Example**

```typescript
const agent: Agent = {
  objectType: "Agent",
  name: "Test Agent",
  mbox: "mailto:test@agent.com"
};

xapi.getAgent({
  agent: agent
}).then((result: AxiosResponse<Person>) => {
  const person: Person = result.data;
  // do stuff with person
});
```

### **Parameters**

| Parameter      | Type                                                                                                                          | Required | Description                    |
| -------------- | ----------------------------------------------------------------------------------------------------------------------------- | -------- | ------------------------------ |
| agent          | [Agent](https://github.com/xapijs/xapi/tree/fd040c6f049f68fce317538626906de57ffebf44/src/interfaces/Statement/Actor/Agent.ts) | true     | The agent experiencing the AU. |
| useCacheBuster | boolean                                                                                                                       | false    | Enables cache busting.         |

### **Returns**

This method returns an `AxiosPromise` with the success `data` containing the [Person](https://github.com/xapijs/xapi/tree/fd040c6f049f68fce317538626906de57ffebf44/src/interfaces/Statement/Actor/Person.ts) if successful.
