# SuggestionsConfig

> Configuration for generating dynamic or static suggestions.

## Overview [#overview]

`SuggestionsConfig` configures how [`Suggestion`](/reference/core/types/Suggestion) pills are produced. It is a union of two variants:

- **`DynamicSuggestionsConfig`**: suggestions are generated by the model from `instructions`.
- **`StaticSuggestionsConfig`**: a fixed list of suggestions you provide.

The variant is determined by which fields are present (`instructions` vs. `suggestions`). Configs are supplied via [`CopilotKitCoreConfig.suggestionsConfig`](/reference/core/types/CopilotKitCoreConfig).

## Import [#import]

```ts
import type { SuggestionsConfig } from "@copilotkit/core";
```

## Definition [#definition]

```ts
type SuggestionsConfig = DynamicSuggestionsConfig | StaticSuggestionsConfig;

type SuggestionAvailability =
  | "before-first-message"
  | "after-first-message"
  | "always"
  | "disabled";

type DynamicSuggestionsConfig = {
  instructions: string;
  minSuggestions?: number;
  maxSuggestions?: number;
  available?: SuggestionAvailability;
  providerAgentId?: string;
  consumerAgentId?: string;
};

type StaticSuggestionsConfig = {
  suggestions: Omit<Suggestion, "isLoading">[];
  available?: SuggestionAvailability;
  consumerAgentId?: string;
};
```

## Properties [#properties]

### DynamicSuggestionsConfig [#dynamicsuggestionsconfig]

<PropertyReference name="instructions" type="string" required>
  A prompt or instructions for the model to generate suggestions.
</PropertyReference>

<PropertyReference name="minSuggestions" type="number" default="1">
  The minimum number of suggestions to generate.
</PropertyReference>

<PropertyReference name="maxSuggestions" type="number" default="3">
  The maximum number of suggestions to generate.
</PropertyReference>

<PropertyReference name="available" type="SuggestionAvailability" default="after-first-message">
  When the suggestions are available: `"before-first-message"`, `"after-first-message"`, `"always"`, or `"disabled"`.
</PropertyReference>

<PropertyReference name="providerAgentId" type="string" default="default">
  The agent ID of the provider of the suggestions.
</PropertyReference>

<PropertyReference name="consumerAgentId" type="string" default="*">
  The agent ID of the consumer of the suggestions. Defaults to `"*"` (all agents).
</PropertyReference>

### StaticSuggestionsConfig [#staticsuggestionsconfig]

<PropertyReference name="suggestions" type='Omit<Suggestion, "isLoading">[]' required>
  The fixed list of suggestions to display. Each entry is a [`Suggestion`](/reference/core/types/Suggestion) without the `isLoading` field.
</PropertyReference>

<PropertyReference name="available" type="SuggestionAvailability" default="before-first-message">
  When the suggestions are available: `"before-first-message"`, `"after-first-message"`, `"always"`, or `"disabled"`.
</PropertyReference>

<PropertyReference name="consumerAgentId" type="string" default="*">
  The agent ID of the consumer of the suggestions. Defaults to `"*"` (all agents).
</PropertyReference>

## Usage [#usage]

```ts
import type { SuggestionsConfig } from "@copilotkit/core";

// Dynamic: model-generated
const dynamic: SuggestionsConfig = {
  instructions: "Suggest follow-up questions about the report",
  maxSuggestions: 3,
  available: "after-first-message",
};

// Static: fixed list
const staticConfig: SuggestionsConfig = {
  suggestions: [
    { title: "Summarize", message: "Summarize this page" },
  ],
  available: "before-first-message",
};
```
