> ## Documentation Index
> Fetch the complete documentation index at: https://docs.velatir.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Instructions

> Teach an agent how to treat a specific scenario.

## What Is an Instruction?

An instruction is a rule you give an agent: in this scenario, do this. Categories cover the common cases out of the box. Instructions let you handle the ones that are specific to your organisation, such as always blocking a project codename, or allowing a scenario your team has already reviewed.

Instructions are forward-looking. Once you add one, the agent applies it to every trace from then on.

## What an Instruction Is Made Of

| Part            | Description                                                                                     |
| --------------- | ----------------------------------------------------------------------------------------------- |
| **Name**        | A clear label, for example "Block credit card numbers (PCI)".                                   |
| **Category**    | The category it relates to, such as Personal data or Credentials. Choose **Other** if none fit. |
| **Trigger**     | When the instruction should apply.                                                              |
| **Criticality** | Low or High. High criticality escalates to a person.                                            |
| **Action**      | What the agent does in this scenario: Allow, Block, or Escalate.                                |

## Triggers

The trigger decides when an instruction applies. Pick the approach that fits the rule.

<Tabs>
  <Tab title="Semantic">
    Matches a scenario by meaning, even when the wording differs. Describe the situation in plain language.

    *Example:* "Customer is discussing their account balance or transaction history."
  </Tab>

  <Tab title="Regex">
    Matches a precise pattern. The fastest and most exact option, and best for structured data such as card numbers or reference codes.

    *Example:* a pattern for a 13 to 16 digit card number.
  </Tab>

  <Tab title="String match">
    Matches an exact list of terms. Best for known codenames, vendor names, or product identifiers.

    *Example:* "Project Aurora".
  </Tab>
</Tabs>

## Create an Instruction

<Steps>
  <Step title="Open Instructions" icon="fingerprint">
    Go to **Agents → Instructions** and start a new instruction.
  </Step>

  <Step title="Describe the scenario" icon="pencil">
    Name it, pick a category, and choose the trigger that matches the rule.
  </Step>

  <Step title="Set criticality and action" icon="gavel">
    Choose Low or High criticality, then the action: Allow, Block, or Escalate.
  </Step>

  <Step title="Assign it to an agent" icon="shield-check">
    Assign the instruction to the agent that should use it. Instructions appear grouped by category on the agent.
  </Step>
</Steps>

## Save an Instruction From an Assessment

You do not have to write every instruction from scratch. When you review an [assessment](/agents/assessments) and decide how a scenario should be treated in future, you can save it as an instruction directly from that decision. The new instruction keeps a link back to the assessment it came from, so you always know where it originated.

***

<CardGroup cols={2}>
  <Card title="Assessments" icon="list-checks" href="/agents/assessments">
    Review verdicts and save instructions from them.
  </Card>

  <Card title="Data Protector" icon="shield-check" href="/agents/data-protector">
    See how instructions sit alongside categories.
  </Card>
</CardGroup>
