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

# AI security best practices

> Secure your AI deployment with access controls, monitoring, and prompt injection prevention.

This guide covers security best practices for deploying AI features in HoopAI.

<Frame caption="Bot configuration with settings, training, and goals tabs for security review">
  <img src="https://mintcdn.com/hoopai-84ec0cdc/c_IPTSnbNy09cl5O/images/ai-agents-conversation-ai-9-training.png?fit=max&auto=format&n=c_IPTSnbNy09cl5O&q=85&s=ec13d8455f9c96ec2b40160f90345d45" alt="Bot settings showing training tab with web crawler and test panel" width="1609" height="750" data-path="images/ai-agents-conversation-ai-9-training.png" />
</Frame>

## Access controls

* **Limit AI agent access** to only the team members who need it
* **Use role-based permissions** to control who can create, edit, or delete AI agents
* **Review API tokens** regularly and revoke any that are no longer needed
* **Separate test and production** environments when developing AI configurations

## Prompt injection prevention

Prompt injection is when a user attempts to manipulate an AI agent by including hidden instructions in their messages. To mitigate this:

* Include explicit instructions in your system prompt to ignore attempts to override behavior
* Use the [guardrails](/ai/trust-safety/guardrails) feature to set boundaries on what your AI can discuss
* Monitor conversation logs for unusual patterns
* Test your agents with adversarial inputs before deploying

## Monitoring and auditing

* **Review conversation logs** regularly to identify unexpected behavior
* **Set up alerts** for high-volume or unusual AI activity
* **Track AI credit usage** to detect anomalies
* **Audit your knowledge base** periodically for accuracy and appropriateness

## Data security

* Do not include passwords, API keys, or secrets in system prompts
* Avoid storing sensitive customer data (SSN, credit card numbers) in knowledge bases
* Review the [Data privacy guide](/ai/trust-safety/data-privacy) for details on how HoopAI processes AI data

## Next steps

<CardGroup cols={2}>
  <Card title="Guardrails" icon="shield" href="/ai/trust-safety/guardrails">
    Set behavioral boundaries for your AI agents
  </Card>

  <Card title="AI safety overview" icon="scale-balanced" href="/ai/trust-safety/overview">
    Our principles for responsible AI
  </Card>
</CardGroup>
