> ## Documentation Index
> Fetch the complete documentation index at: https://audio-app-kit-docs.upgrade-api.int.bragi-dev.cloud/llms.txt
> Use this file to discover all available pages before exploring further.

# Actions

Actions are events that are dispatched to the native app.

## Using Actions

<CodeGroup>
  ```typescript Typescript
  import { AudioAppKit } from '@bragiai/audio-app-kit';
  // Usage: AudioAppKit.chatAgent.toggleState(state);
  ```

  ```javascript Javascript (CommonJS)
  const { AudioAppKit } = require('@bragiai/audio-app-kit');
  // Usage: AudioAppKit.chatAgent.toggleState(state);
  ```

  ```javascript Javascript (ESM)
  import { AudioAppKit } from '@bragiai/audio-app-kit';
  // Usage: AudioAppKit.chatAgent.toggleState(state);
  ```
</CodeGroup>

## List of Actions

### App Did Load

This action should be invoked when the Web app has loaded all assets and is ready to receive events from the native app.

<CodeGroup>
  ```typescript Typescript
  AudioAppKit.webUI.addDidLoad();
  ```

  ```javascript Javascript
  AudioAppKit.webUI.addDidLoad();
  ```
</CodeGroup>

### Close App

This action should be invoked when the native app should close the web view.

<CodeGroup>
  ```typescript Typescript
  AudioAppKit.webUI.closeApp();
  ```

  ```javascript Javascript
  AudioAppKit.webUI.closeApp();
  ```
</CodeGroup>
