Skip to content

Agent Instructions

Admin > AI > Agent Instructions keeps what AI agents connected to Clarive (through the MCP server or the clarive CLI) are told about this installation: how its categories, workflows, deploys and rules work, and what is particular to each project. See Agent Instructions for what agents receive and how they prepare them.

The page needs the permission Prepare the AI Agent Instructions (action.ai.instruction_setup).

Settings

  • Agent Instructions: off, agents get no instructions and nobody is warned.
  • Warn when the Clarive configuration changes: the users who prepare the instructions are warned by their agent when rules, categories, workflows, statuses, environments or projects changed since the instructions were last prepared.

Under them, the page tells whether the instructions were prepared, when and by whom. If the configuration changed since, it lists what changed. Mark as prepared and Mark as up to date record the configuration as it is now: use them when you wrote or checked the snippets yourself. Mark as not prepared undoes it: the users who prepare the instructions are asked to prepare them again on their next connection, and the snippets stay.

Snippets

The instructions are split into snippets: a title, a category and a short Markdown text. A snippet is either global (every project) or assigned to one or more projects. An inactive snippet is kept but not served to agents. A snippet that is not global needs at least one project: with none, no agent would read it, so it cannot be saved.

There are five views:

  • Global and projects: the Global node and every project, with their snippets under them. A project without snippets of its own gets only the global ones; its + writes the first one. While searching or filtering only the projects with snippets found are shown.
  • Snippets: each snippet, with the projects that use it under it.
  • Categories: the snippets as cards, grouped by category.
  • List: a grid of every snippet.
  • Tokens: what the instructions cost (see below).

Every snippet shows its estimated cost in tokens.

The search box (press / to go to it, Esc to clear it) finds the snippets that contain every word you type, in their title, text, category, projects, authors or id. Upper and lower case and accents are ignored, and "quoted words" are searched as one phrase. Matches are highlighted.

Next to it you can filter by categories, by project (the snippets an agent of that project gets: the global ones and the project's), and show only the snippets edited by hand or the inactive ones.

Tokens

Every AI client that works with Clarive pays for the instructions in tokens: they are added to its context. The Tokens view estimates the cost (4 characters per token, active snippets only):

  • Each MCP connection: the notice added to the server instructions when a client connects. It is longer for the users who prepare the instructions, when they get a warning.
  • Global instructions: what an agent reads without a project, and what every project's instructions start with.
  • By project: what an agent reads for each project with its own snippets: the global ones plus the project's. Projects without their own snippets get the global instructions only.
  • By snippet: what each snippet costs, longest first.

Short snippets keep the cost down. The editor shows the cost of a snippet as you type and warns when the text gets long (over 800 characters). A snippet can be 4000 characters at most.

Examples

Examples shows the example snippets Clarive gives agents that prepare the instructions. They come from an imaginary installation, so the agent copies their shape and length, not their names. Use as template opens a new snippet with the example's text.

The + buttons create a snippet: global, for a project, or in a category. Click a snippet to edit it. The editor has a Markdown preview.

A snippet you save in this page is marked as edited by hand (a pencil icon). Agents ask the user before changing or deleting it.

What an agent reads shows the instructions an agent gets for the global scope or for a project, as one text, with an estimate of its size in tokens.