# SDK API

{% hint style="info" %}
Related C++ Header in the Auterion SDK: `<auterion_sdk/auterion.hpp>`

Code documentation [here](https://auterion.github.io/auterion-sdk/).
{% endhint %}

## SDK life cycle

The `auterion::SDK` object is used to manage the life cycle of the SDK. The most common case is to instantiate the SDK at the start of the `main` function, and to let it go out of scope when the program exits.

```cpp
int main(int argc, char* argv[]) {
    auterion::SDK sdk(argc, argv, "my_application_name");

    MyMode my_mode(sdk);

    sdk.run();

    return 0;
}
```

The `sdk.run()` call starts all the asynchronous callback logic in the SDK. When you subscribe to callbacks, this is when those will start to be callled. `sdk.run()` only returns when the program is shut down.


---

# 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://docs.auterion.com/app-development/auterion-sdk/sdk-api.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.
