---
name: kimaai_admin_assistant_instructions
type: filter
since: 1.5.0
tier: free
feature: admin-assistant
area: admin-assistant
summary: Changes the admin assistant's instructions for one request.
parameters:
  - name: instructions
    type: string
    description: The instructions of the admin assistant's configuration.
  - name: chatbot_settings
    type: array
    description: The admin assistant's runtime settings.
  - name: post_id
    type: int
    description: The request's postId, 0 unless a kimaai_admin_assistant_ai_payload callback set one.
returns:
  type: string
  description: The instructions to send.
surfaces: [admin_assistant]
---

# kimaai_admin_assistant_instructions

## When it fires

Once per admin assistant request that gets an answer, when KimaAI builds the messages for the AI provider, before the session's history and the administrator's message are added. A button of a setup workflow whose callback answers without the provider builds them too, for the assistant's history. The chatbot and the search answer have `kimaai_chatbot_instructions` instead. The instructions are the first system message. KimaAI's own instructions tell the model how to use the settings tools, so add to them rather than replace them, or the assistant can no longer change settings reliably.

Unlike the chatbot's instructions, KimaAI fills no placeholders here (`{current_date}`, `{glossary}` and the page placeholders stay as they are), and no KimaAI code hooks the filter. When an OpenAI session continues, only the new message is sent and the provider keeps the earlier turns, so the instructions of the session's first message stay in force; a changed callback reaches the next new session.

The admin assistant is not released yet: its panel and its routes are switched off in this release, so these requests are not sent.

## Example

```php
add_filter(
  'kimaai_admin_assistant_instructions',
  function (string $instructions, array $chatbot_settings): string {
    return $instructions . "\nAnswer in British English and call each setting by the label the KimaAI admin shows.";
  },
  10,
  2
);
```

## Related

- `kimaai_admin_assistant_ai_payload`: changes the rest of the request.
- `kimaai_chatbot_instructions`: the chatbot's instructions.
