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

# For AI Agents

> How LLMs and AI agents can query Animam chatbots

Animam provides a conversational interface between your website and any LLM. Instead of scraping HTML, AI agents can query your chatbot directly and get accurate, author-intended responses.

## Why This Matters

### The Scraping Problem

When Perplexity, ChatGPT, or any AI agent wants information about your business:

1. They crawl your website periodically
2. Parse HTML structures that change
3. Extract text without understanding context
4. Generate responses that may be outdated or wrong

**You have no control over what they say about you.**

### The Animam Solution

With Animam, AI agents can:

1. **Query your API** - `POST /chat/:slug` with a question
2. **Get your answer** - The response you control, in real-time
3. **Use structured context** - Your corpus, your persona, your intent

```
┌──────────────────────────────────────────────────────────────┐
│                                                              │
│   Your Site  ←──── ANIMAM ────→  All LLMs                   │
│                                                              │
│   • Corpus                        • Claude                   │
│   • Segments                      • ChatGPT                  │
│   • Persona                       • Perplexity               │
│   • Intent                        • Custom agents            │
│                                                              │
└──────────────────────────────────────────────────────────────┘
```

## Two Ways to Connect

<CardGroup cols={2}>
  <Card title="REST API" icon="code" href="/for-llms/api-access">
    Any LLM can query your chatbot via HTTP. Simple POST request, JSON response.
  </Card>

  <Card title="MCP Server" icon="robot" href="/for-llms/mcp-universal">
    Claude Desktop and MCP clients connect directly. Native integration.
  </Card>
</CardGroup>

## LLM Context Discovery

Animam exposes a `/context/:slug` endpoint that provides structured information about your chatbot:

```bash theme={null}
curl https://api.animam.ai/context/your-slug
```

```json theme={null}
{
  "tenant": {
    "name": "Your Company",
    "description": "What you do",
    "botName": "Alice",
    "botTitle": "Customer Support"
  },
  "capabilities": ["faq", "contact-form", "product-info"],
  "segments": ["default", "pricing", "support"],
  "endpoints": {
    "chat": "POST https://api.animam.ai/chat/your-slug",
    "mcp": "npx @animam/mcp"
  }
}
```

This allows AI agents to:

* Discover what your chatbot can do
* Choose the right segment for their query
* Understand the persona they're talking to

## Use Cases

### Perplexity / Search Agents

Instead of scraping your pricing page, Perplexity can query:

```
POST /chat/your-slug
{"message": "What are your pricing plans?"}
```

And get your exact, up-to-date pricing.

### Claude Desktop / AI Assistants

Your team can use Claude Desktop with your business context:

```
"Connect to the your-slug chatbot and answer customer questions"
```

Claude loads your corpus and becomes your support agent.

### Custom Integrations

Build agents that query multiple Animam chatbots:

```python theme={null}
import requests

def ask_vendor(slug, question):
    response = requests.post(
        f"https://api.animam.ai/chat/{slug}",
        json={"message": question}
    )
    return response.json()["reply"]

# Compare vendors
acme_price = ask_vendor("acme-corp", "What's your enterprise pricing?")
beta_price = ask_vendor("beta-inc", "What's your enterprise pricing?")
```

## Next Steps

<CardGroup cols={2}>
  <Card title="API Access" icon="code" href="/for-llms/api-access">
    How to query chatbots via REST API
  </Card>

  <Card title="MCP Universal" icon="robot" href="/for-llms/mcp-universal">
    Connect Claude Desktop to any chatbot
  </Card>
</CardGroup>
