Documentation

Teach your chatbot, put it on your website with one script tag, or call it from your own code. It answers only from the knowledge you give it.

Website widget

  1. Open your agent and go to the Install tab.
  2. Add every domain the widget will run on (for example example.com).
  3. Paste the snippet just before </body>, then press Publish.
<script
  src="https://www.pagently.in/widget.js"
  data-bot-id="YOUR_BOT_ID"
></script>

The widget only answers on domains you've added. It shows a short “leave your details” card after the first answer and whenever the agent can't help; configure it under Settings → Lead form.

Knowledge

On the Knowledge tab, upload PDF, Word, TXT or Markdown files, or paste text. Add instant answers for questions that must always get the same exact reply, like prices or opening hours. Removing or replacing a source changes the very next answer.

Free uses keyword search. Starter and Pro add smart search, which matches by meaning as well as keywords, so reworded questions still find the right passage. Scanned PDFs that contain only images can't be read.

Plans and limits

LimitFreeStarterPro
Agents1110
Messages / month1003,00010,000
Knowledge300 KB3 MB30 MB
Leads / month5300Unlimited
AIYour own keyIncludedIncluded, ${PRO_MODELS.length} models

Every assistant reply that uses the AI costs credits: 1 on Free and Starter, and the chosen model's weight on Pro (${m.label} ×${m.credits}, ${m.label} ×${m.credits}, ${m.label} ×${m.credits}, ${m.label} ×${m.credits}, ${m.label} ×${m.credits}, ${m.label} ×${m.credits}). Instant answers and greetings are free. Widget and API messages share the same monthly allowance, which resets on the 1st of each month (UTC).

API quickstart

  1. Create a key in Account → API keys.
  2. Copy your bot's ID from its dashboard page.
  3. Call the endpoint below.
curl https://www.pagently.in/api/v1/chat \
  -H "Authorization: Bearer sk_live_…" \
  -H "Content-Type: application/json" \
  -d '{
    "bot": "YOUR_BOT_ID",
    "message": "Do you ship across India?"
  }'

Authentication

Pass your secret key in the Authorization header as a Bearer token. Keys are scoped to your account and can reach any bot you own. Treat them like passwords, never expose them in browser or mobile code. If a key leaks, revoke it from the dashboard and create a new one.

Authorization: Bearer sk_live_xxxxxxxxxxxxxxxxxxxx

Send a message

POST /v1/chat

Request body

FieldTypeDescription
botstringRequired. The bot ID to message.
messagestringRequired. Visitor text, up to 4000 chars.
conversationstringOptional. Continue a thread by passing the ID returned earlier.

Response

{
  "reply": "Yes! We ship across India in 3–5 business days.",
  "conversation": "conv_9a1f…"
}

Pass conversation back on the next call to keep context across turns.

List conversations

List conversations, or fetch one with its full transcript by passing conversation.

GET /v1/conversations

# one conversation with messages
curl "https://www.pagently.in/api/v1/conversations?conversation=CONV_ID" \
  -H "Authorization: Bearer sk_live_…"

Errors

StatusMeaning
400Missing or invalid body.
401Missing, invalid, or revoked API key.
402own_key_required: on Free, add your AI provider key under Account.
403bot_inactive: the bot is over your plan's agent limit.
404Bot not found or not owned by this key.
429quota_exceeded (monthly credits used; includes resets_at) or rate_limited.
502model_error: the AI provider failed. No credits were used; retry.

Ready to build?

Create an agent, add your knowledge, and install it in a few minutes.

Get your API key
Docs | Pagently