---
title: "Agent AI Answers"
description: "Let your AI agent add Edge Assist to the sites it deploys — grounded AI answers for visitors, wired up in one API call."
url: https://edge.network/docs/agent/assist/
---

# Agent AI Answers

Agent Tooling

# AI Answers

"Add an AI assistant to my docs site" is two API calls. Your agent creates an Edge Assist site, generates a content index from the pages it's deploying, triggers an ingest, and drops the one-line embed snippet into the site — all without leaving the Agent API.

## Why Assist in the Agent API?

### Grounded Answers

Assist only answers from the site's own indexed content, with citations — no hallucinated features or invented pricing.

### One-Line Embed

The create response includes the exact script tag and a hosted fallback URL — no docs lookup needed.

### Agent-Friendly Ingestion

Content goes in as a simple JSON index the agent can generate at build time from the pages it's already deploying.

### Feedback Loop

The question log surfaces what visitors actually asked — unanswered questions are content gaps the agent can fix.

## API Endpoints

```
GET    /agent/assist/sites                 # List sites
POST   /agent/assist/sites                 # Create a site (returns sitekey + embed snippet)
PATCH  /agent/assist/sites/{id}            # Update name, hostname, index_url, site_prompt
DELETE /agent/assist/sites/{id}            # Delete a site
POST   /agent/assist/sites/{id}/reingest   # Index the site's content now
GET    /agent/assist/sites/{id}/overview   # Usage + health (questions, answer rate, cap)
GET    /agent/assist/sites/{id}/questions  # Question log (?answered=false for gaps)
```

Requires an agent access code with the `assist` product. Creating, updating, deleting, and reingesting requires the `manage` permission. All write endpoints support `X-Dry-Run: true`.

## Creating a Site

```
POST /agent/assist/sites
Authorization: Bearer ea_live_...

{
  "name": "Docs site",
  "hostname": "docs.example.com",
  "index_url": "https://docs.example.com/assist-index.json"
}

# Response:
{
  "site": {
    "id": "ast-abc123",
    "name": "Docs site",
    "hostname": "docs.example.com",
    "sitekey": "ea_7f31d9c2b48e5a06...",
    "monthlyCap": 250,
    "embed": {
      "script": "<script src=\"https://assist.edge.network/widget.js\"
        data-sitekey=\"ea_7f31...\" defer></script>",
      "hostedUrl": "https://assist.edge.network/w/ea_7f31..."
    }
  },
  "next_steps": [
    "Trigger the first ingest: POST /agent/assist/sites/ast-abc123/reingest",
    "Add the embed to the site's pages: <script src=...></script>"
  ],
  "tell_user": "Assist site \"Docs site\" created for docs.example.com.
    Trigger a reingest to index the content, then add the one-line embed
    snippet. Answers only work on docs.example.com (origin-enforced)."
}
```

Sitekeys are origin-enforced

The widget only answers on the hostname the site was created for. Get the hostname right — a stolen sitekey is useless off-domain, but so is a typo'd one on-domain.

## The Content Index

Assist ingests a JSON file hosted at a public URL. Agents deploying a static site can generate it at build time from the same pages:

```
{
  "pages": [
    {
      "url": "https://docs.example.com/getting-started",
      "title": "Getting Started",
      "text": "Plain text of the page content..."
    }
  ]
}
```

Set it on creation (`index_url`) or later via PATCH, then trigger a reingest. Assist also refreshes the index automatically on a regular cycle and skips re-processing unchanged content.

## Indexing Content

```
POST /agent/assist/sites/ast-abc123/reingest
Authorization: Bearer ea_live_...

# Response:
{
  "index": { "pages": 42, "chunks": 318, "updatedAt": "2026-08-08T14:02:11Z" },
  "tell_user": "Content indexed: 42 pages, 318 chunks. The assistant is
    answering from this content now."
}
```

## Typical Agent Workflow

- Create the site — scoped to the deployment's hostname, with the content index URL if it already exists.
- Generate the index — a JSON file of the site's pages, deployed alongside the site itself.
- Trigger a reingest — and confirm the page/chunk counts look right.
- Inject the embed snippet — one script tag, ideally in the shared layout so it's on every page.
- Report back — including the free-tier cap (250 questions/month) and how to go past it (pay-as-you-go, active automatically with a card on file in Billing).

## Pricing

The free tier includes one site and 250 answered questions per site per month. Cached answers are free and don't count against the cap. Pay-as-you-go — active automatically once the account has a card on file — unlocks more sites and pays for overage at $0.01 per question from the prepaid balance (a monthly cap is optional). When the headroom runs out, the widget stops answering (search keeps working) until the next month or a top-up.

## See Also

[Edge Assist Docs Ingestion, widget options, and the index format in full](https://edge.network/docs/assist) [Discovery Endpoint The agent's entry point](https://edge.network/docs/agent/discovery)
[Back to Docs](https://edge.network/docs) [Need help?](https://edge.network/support)
