Skip to content

Guardrails

Guardrails define boundaries for what the AI agent can and cannot do within conversations. They act as safety constraints that help organizations maintain control over agent behavior, especially when non-technical users are interacting with production codebases.

Guardrails are system-level instructions injected into every agent interaction. Unlike skills (which are user-selected per message), guardrails apply automatically to all conversations across the platform.

When a message is sent to the agent, ReArch prepends the active guardrail rules before the user’s prompt. The agent follows these constraints alongside its normal behavior.

PatternDescription
File restrictionsLimit which files or directories the agent can modify (e.g., “Do not modify files in the infrastructure/ directory”).
Branch protectionInstruct the agent to never commit directly to main or master.
Language constraintsRequire the agent to use specific programming languages or frameworks.
Review-first policyInstruct the agent to always explain proposed changes before making them.
No destructive operationsPrevent the agent from running rm -rf, DROP TABLE, or other destructive commands.
Code style enforcementRequire adherence to specific coding standards, naming conventions, or formatting rules.
  1. Navigate to Administration > Settings.
  2. Locate the Guardrails section.
  3. Define your guardrail rules.
  4. Save the configuration.

Changes apply to all new messages immediately. Existing conversations will use the updated guardrails on the next message.

  • Keep guardrails concise and specific. Vague instructions are more likely to be misinterpreted by the model.
  • Test guardrails with a sample conversation before rolling them out to your team.
  • Use guardrails in combination with skills — guardrails set the boundaries, skills provide task-specific guidance.