> Documentation index: https://www.gooddata.ai/docs/gooddata-ui/llms.txt lists every page of these docs as Markdown.

# useDashboardCopilot()

- Package: [@gooddata/sdk-ui-gen-ai](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-gen-ai/index.md)
- Kind: function
- Stability: alpha
- Source: https://github.com/gooddata/gooddata-ui-sdk/blob/rel/11.71/libs/sdk-ui-gen-ai/src/copilot/useDashboardCopilot.ts
- Guides: [AI Assistant](https://www.gooddata.ai/docs/gooddata-ui/latest/ai-modules/ai-assistant/index.md), [Place and connect the AI Assistant](https://www.gooddata.ai/docs/gooddata-ui/latest/ai-modules/ai-assistant-layout/index.md)

> **Alpha API.** Initial API, highly likely to change outside SemVer. Don't build on it in production. See [API maturity](https://www.gooddata.ai/docs/gooddata-ui/latest/integrations/platform/api-maturity/index.md).
> 

Connect a dashboard and assistant using one CopilotHandler and one outer GenAiStore.

**Signature:**

```typescript
export declare function useDashboardCopilot(): IUseDashboardCopilotResult;
```
**Returns:**

[IUseDashboardCopilotResult](https://www.gooddata.ai/docs/gooddata-ui/latest/api-reference/sdk-ui-gen-ai/sdk-ui-gen-ai.iusedashboardcopilotresult/index.md)

Component props and actions for the connected dashboard and assistant.

## Remarks

Call once per dashboard/assistant pair. Call `dashboardProps`, `genAiStoreProps`, and `assistantProps` with optional application props, then spread their results onto the respective components. These getters compose event handlers and connection callbacks so application customizations do not replace internal wiring. Spread `composingProps` directly; keep the assistant beside the dashboard and wrap only the dashboard in the composing presentation. Definitions are applied only to an initialized dashboard in edit mode. To generate a new dashboard, mount an empty Dashboard in edit mode before calling `generateDashboard`; this hook does not navigate or replace an existing saved dashboard. Remount the pair when changing backend or workspace.
