# MessageRuntime
URL: /docs/api-reference/runtimes/message-runtime

Hooks for accessing message state, utilities, and edit composer.

***

title: MessageRuntime
description: Hooks for accessing message state, utilities, and edit composer.
-----------------------------------------------------------------------------

import { ParametersTable } from "@/components/docs/tables/ParametersTable";
import {
  MessageState,
  MessageUtilsState,
  EditComposerState,
} from "@/components/docs/tables/parameters/context";

### `useMessage`

Retrieve the message object:

```tsx
import { useMessage } from "@assistant-ui/react";

const { message } = useMessage();
const msg = useMessage((m) => m.message);
```

<ParametersTable {...MessageState} />

### `useMessageUtils`

Provides utility functions for a message (e.g., copy status):

```tsx
import { useMessageUtils } from "@assistant-ui/react";

const messageUtils = useMessageUtils();
const isCopied = useMessageUtils((m) => m.isCopied);
```

<ParametersTable {...MessageUtilsState} />

### `useEditComposer`

Access the edit composer state (used when editing a message):

```tsx
import { useEditComposer } from "@assistant-ui/react";

const editComposer = useEditComposer();
const text = useEditComposer((m) => m.text);
```

<ParametersTable {...EditComposerState} />
