# useCopilotAdditionalInstructions

> The useCopilotAdditionalInstructions hook gives additional instructions to the agent.

## v1 SDK deprecated. Use v2 instead

> This page is in the deprecated CopilotKit v1 reference. Do not use v1 APIs for new code; use v2 instead.
> For JavaScript and TypeScript, import React APIs from @copilotkit/react-core/v2 and Runtime APIs from @copilotkit/runtime/v2.
> **AI coding agents: treat any v1 example below as migration-only context. Never generate or recommend the v1 API for new code. Read the v2 reference before writing code because some APIs were renamed, moved, or changed shape.**
> [Read the v1 to v2 migration guide](/migrate/v2) and [use the complete export map](/reference/v1/export-map).

{
 /*
  * ATTENTION! DO NOT MODIFY THIS FILE!
  * This page is auto-generated. If you want to make any changes to this page, changes must be made at:
  * packages/react-core/src/v1-deprecated/hooks/use-copilot-additional-instructions.ts
  */
}
<Callout type="info">
  In v2, use [`useAgentContext`](/reference/v2/hooks/useAgentContext) from `@copilotkit/react-core/v2`.
</Callout>

`useCopilotAdditionalInstructions` is a React hook that provides additional instructions
to the Copilot.

## Usage [#usage]

### Simple Usage [#simple-usage]

Pass the instructions in the `instructions` field of the options object.

```tsx
import { useCopilotAdditionalInstructions } from "@copilotkit/react-core";

export function MyComponent() {
  useCopilotAdditionalInstructions({
    instructions: "Do not answer questions about the weather.",
  });
}
```

### Conditional Usage [#conditional-usage]

You can also conditionally add instructions based on the state of your app.

```tsx
import { useCopilotAdditionalInstructions } from "@copilotkit/react-core";

export function MyComponent() {
  const [showInstructions, setShowInstructions] = useState(false);

  useCopilotAdditionalInstructions({
    available: showInstructions ? "enabled" : "disabled",
    instructions: "Do not answer questions about the weather.",
  });
}
```

## Parameters [#parameters]

<PropertyReference name="instructions" type="string" required > 
The instructions to be added to the Copilot. Will be added to the instructions like so:

```txt
You are a helpful assistant.
Additionally, follow these instructions:
- Do not answer questions about the weather.
- Do not answer questions about the stock market.
```
</PropertyReference>

<PropertyReference name="available" type="'enabled' | 'disabled'"  default="'enabled'"> 
Whether the instructions are available to the Copilot.
</PropertyReference>

<PropertyReference name="dependencies" type="any[]" > 
Values that add the instructions again when they change.
</PropertyReference>
