Skip to main content
The Instruction CRD gives you a first-class Kubernetes resource for managing LLM system prompts. Instead of embedding a system prompt directly inside an Agent manifest — where it is easy to let it drift or go unreviewed — you create a standalone Instruction with a content field containing the prompt text. The operator stores this text in a ConfigMap and makes it available to any agent that references it. Because Instruction is a proper Kubernetes resource, you can version-control it, apply RBAC to it, diff it in pull requests, and share it across many agents without duplication.

API reference


Spec fields

The Instruction spec contains a single required field:

Creating an Instruction

Apply it with:
After reconciliation the operator creates a ConfigMap in the same namespace and records its name in status.configMapName.

Status fields


Referencing an Instruction from an Agent

Agents support two ways to attach a system prompt through spec.instruction: Inline — the operator creates a child Instruction CR automatically:
By reference — reuse a shared Instruction CR across multiple agents:
The instructionRef approach is also required for the template runtime mode, where the operator builds the agent deployment from scratch and needs a stable reference to the system prompt.

Sharing one Instruction across many agents

A key benefit of the Instruction CRD is the ability to keep a single source of truth for a prompt and reference it from any agent in the cluster:

kubectl operations


Best practices

  1. Keep prompts focused — each Instruction should describe one agent persona or behaviour. Avoid combining unrelated responsibilities in a single prompt.
  2. Version-control every Instruction manifest — because prompts directly influence agent behaviour, treat them with the same rigour as application code: peer review, changelogs, and staged rollouts.
  3. Use namespaces to control sharing — place shared, canonical prompts in a dedicated namespace (e.g., shared-resources) and use RBAC to control who can modify them.
  4. Prefer instructionRef over inline template for production agents — a standalone Instruction CR is easier to audit, update, and roll back independently of the Agent manifest.
  5. Test prompt changes in a staging namespace before promoting them to production by creating a separate Instruction CR in your staging namespace and verifying agent behaviour.
  6. Annotate with context — use metadata.annotations to record the author, last-reviewed date, and linked issue or pull request for each Instruction.