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

# AI Agent best practices

> Practical standards for reliable Fliqr AI Agents — prompts, knowledge, tools, testing, cost control, and safe handover.

Use these practices to keep Agents accurate, affordable, and safe in production.

## Prompts

* Lead with role → constraints → output format
* Ban inventing prices, legal advice, or competitor claims
* Force language mirroring (“reply in the user’s language”)
* Include a concrete JSON example when you need [rich responses](/docs/core-concepts/ai-agents/rich-responses)
* Inject contact fields carefully; handle empties

## Knowledge and files

* Prefer focused sources over one mega-document
* Remove low-value crawled pages after indexing
* Re-train after major content changes
* Put immutable rules in the prompt, bulky facts in knowledge/[files](/docs/core-concepts/ai-agents/files)

## Tools (functions & MCP)

* Name tools clearly (`get_order_status`)
* Describe *when* to call them, not only *what* they return
* Validate all tool arguments server-side
* Prefer idempotent writes
* Scope MCP credentials to least privilege

## Routing and fallbacks

* Keywords for hard overrides; Agent for natural language — [priority](/docs/core-concepts/ai-agents/keywords-and-priority)
* Always define [human handover](/docs/core-concepts/ai-agents/human-handover)
* Pair Agents with Flows when steps must be exact

## Cost and quality

| Practice                          | Why                              |
| --------------------------------- | -------------------------------- |
| Start on a small/fast model       | Cheaper iteration                |
| Monitor **Settings → AI Usage**   | Catch runaway threads            |
| Cap knowledge noise               | Fewer useless tokens retrieved   |
| Test Playground edge cases weekly | Prompts drift as products change |

## Release checklist

1. Provider connected and model selected
2. Prompt constraints reviewed by a human
3. Knowledge/files answer the top 20 real questions
4. Tools tested for success **and** failure
5. Handover + fallback Flow verified
6. Channel-specific rich messages tested on device

## Next

<CardGroup cols={2}>
  <Card title="Limits" icon="gauge" href="/docs/core-concepts/ai-agents/limits">
    Token, knowledge, and platform caps.
  </Card>

  <Card title="Prompt engineering" icon="pen-nib" href="/docs/core-concepts/ai-agents/prompt-engineering">
    Deeper prompt patterns and examples.
  </Card>
</CardGroup>
