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

# AI Guardrails

> Secure AI generated code using guardrails tailored for your organization and repositories

AI Guardrails generate Markdown instructions that coding agents can use when generating code. You can create rules for your whole organization or for a selected set of monitored repositories. Organization and repository configurations are managed separately and are applied together by Symbiotic Code when both are available.

Only organization members with the required guardrail permissions can create, update, or delete configurations. In the portal, organization guardrails are available to organization administrators and owners.

## Create organization guardrails

Organization guardrails apply your organization's security and development context across projects. You can optionally provide internal policy and requirements files in Markdown, text, or PDF format, answer the security questionnaire, and add custom policies.

<Steps>
  <Step>
    Open [AI Guardrails](https://app.symbioticsec.ai/guardrails) and select **Create organization AI guardrails**.
  </Step>

  <Step>
    Upload up to five internal policy or requirements files, if needed. Each file can be up to 50 MB and must be a `.md`, `.txt`, or `.pdf` file. This step is optional.
  </Step>

  <Step>
    Answer the security questions to provide context about your organization. Questions are optional, but completing the relevant questions produces more tailored rules.
  </Step>

  <Step>
    Add any additional code or infrastructure policies in **Custom policies**, then click **Generate guardrails**.

    <Info>
      The portal uploads and analyzes selected files before submitting the configuration. File-content generation runs asynchronously, so the generated `AGENTS.md` content may appear after the configuration is created.
    </Info>
  </Step>

  <Step>
    Review the generated `AGENTS.md` in the preview panel. You can edit and save the custom document content from the preview; generated file content is regenerated when the questionnaire answers or custom document content changes.
  </Step>
</Steps>

## Create repository guardrails

Repository guardrails apply to one or more monitored repositories. A repository can belong to only one active repository guardrail configuration, and repositories that already have an active configuration cannot be selected again. When creating a configuration for multiple repositories, select repositories that share the same security and development context.

<Info>
  When you connect Symbiotic to your Gihub, or Gitlab, all scanned repositories are analyzed and guardrails are automaticlaly generated for you.
</Info>

<Steps>
  <Step>
    Open [AI Guardrails](https://app.symbioticsec.ai/guardrails) and select **Create repository AI guardrails**.
  </Step>

  <Step>
    Select the monitored repositories to which the rules should apply. If no repositories are available, configure repository monitoring in **Settings → Repositories** first.
  </Step>

  <Step>
    Answer the security questions and add any repository-specific code or infrastructure policies. Questions and custom policies are optional.
  </Step>

  <Step>
    Choose whether to include the organization's guardrails, then click **Generate guardrails**.

    <Info>
      Including organization guardrails combines organization-level instructions with the repository-specific rules.
    </Info>
  </Step>

  <Step>
    Review the generated `AGENTS.md` in the preview panel. You can rename, edit, save, or delete the configuration from the repository guardrail view.
  </Step>
</Steps>

## Deploy and use guardrails

The generated file is named `AGENTS.md`. From the preview panel, use **Copy** to copy the complete Markdown file or **Download** to download it locally.

Place the file where your coding agent expects its instructions:

* **Agents that support `AGENTS.md`:** place it anywhere supported by the agent; the repository root is the recommended location.
* **Claude Code:** place it at the repository root.
* **GitHub Copilot:** use the instruction location supported by your Copilot setup, such as `.github/instructions`.

<Info>
  [Symbiotic Code](https://docs.symbioticsec.ai/) automatically fetches active organization guardrails and repository guardrails when a project starts and refreshes them periodically. Repository matching uses the project's Git remote URL. Locally generated repository guardrails take precedence over the remotely fetched repository configuration.
</Info>

For other coding agents, copy or download the generated `AGENTS.md` and commit it to the repository so the team can share the same instructions. The generated file is a snapshot: update or regenerate the configuration when your organization's policies or repository context changes.
