# Advanced BCI

In this section, you will find some advanced BCI features. Please read the section [BCI](/cortex-api/bci.md) first.

The methods in this section are to read and modify the attributes of a training profile. Changing these attributes affects the way the facial expression and mental command detections work. It can make an action easier to detect, or it can completely disable an action.

{% hint style="info" %}
You can use [EmotivBCI](https://www.emotiv.com/emotiv-bci/) to change the attributes of a profile and see how it affects the detections.
{% endhint %}

## Profile name or session id

Most of the methods takes 2 optional parameters, a profile name and a session id.

| Name    | Type     | Required | Description                                                                     |
| ------- | -------- | -------- | ------------------------------------------------------------------------------- |
| profile | `string` | no       | The name of a profile.                                                          |
| session | `string` | no       | A session id returned by [createSession](/cortex-api/session/createsession.md). |

You must set one of these 2 parameters, and omit the second parameter.

If you set the **profile**, then Cortex will read the attributes of a profile from the hard drive. You can only read the attributes, you cannot change them. The profile is read only.

If you set the **session**, then Cortex will read the attributes of a profile currently loaded in-memory. You can also change these attributes. The profile is in read-write mode. After you edited the attributes, you should [save the profile](/cortex-api/bci/setupprofile.md) to persist your changes.

{% hint style="info" %}
If Cortex tells you that **profile** is a required parameter, then please set this parameter to an empty string.
{% endhint %}

There is a bug in Cortex 2.0.0. The parameter **profile** is required, even if you set the parameter **session**. So, to read/write attributes from a session, you should set the **session** to your session id and set **profile** to an empty string. Don't set it to null, don't omit it.\
This bug is fixed in Cortex version 2.1.0 and above.


---

# 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://emotiv.gitbook.io/cortex-api/advanced-bci.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.
