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
- Open your agent and go to the Install tab.
- Add every domain the widget will run on (for example
example.com). - 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
| Limit | Free | Starter | Pro |
|---|---|---|---|
| Agents | 1 | 1 | 10 |
| Messages / month | 100 | 3,000 | 10,000 |
| Knowledge | 300 KB | 3 MB | 30 MB |
| Leads / month | 5 | 300 | Unlimited |
| AI | Your own key | Included | Included, ${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
- Create a key in Account → API keys.
- Copy your bot's ID from its dashboard page.
- 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_xxxxxxxxxxxxxxxxxxxxSend a message
POST /v1/chat
Request body
| Field | Type | Description |
|---|---|---|
bot | string | Required. The bot ID to message. |
message | string | Required. Visitor text, up to 4000 chars. |
conversation | string | Optional. 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
| Status | Meaning |
|---|---|
400 | Missing or invalid body. |
401 | Missing, invalid, or revoked API key. |
402 | own_key_required: on Free, add your AI provider key under Account. |
403 | bot_inactive: the bot is over your plan's agent limit. |
404 | Bot not found or not owned by this key. |
429 | quota_exceeded (monthly credits used; includes resets_at) or rate_limited. |
502 | model_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