Features Pricing Blog FAQ About Contact 🛒 Cart
Sign In Get Started

Documentation

Everything you need to build, deploy, and scale AI agents with aiAgentOne

Overview

aiAgentOne is an enterprise Agentic AI platform that lets you create intelligent, autonomous AI agents trained exclusively on your own knowledge base. Unlike generic chatbots, our agents answer only from your verified content — ensuring accuracy, brand consistency, and zero hallucinations.

Deploy in Minutes

One script tag to add AI chat to any website

Enterprise Security

SOC2, GDPR compliant. Your data stays yours

Multi-Channel

Website widget, WhatsApp, REST API & more

Platform Architecture

The platform consists of these core components:

  • AI Agents — Autonomous agents with configurable personalities, escalation rules, and operating schedules
  • Knowledge Base — RAG-powered (Retrieval-Augmented Generation) system with vector search across documents, URLs, FAQs, and APIs
  • Chat Engine — Real-time conversational AI with confidence scoring, response guards, and human handoff
  • Widget — Embeddable JavaScript widget with theming and customization
  • Dashboard — Analytics, conversation management, and agent configuration UI

Quick Start

Get your first AI agent live in under 30 minutes:

1

Create an Account

Sign up at aiagentone.in/register. Free tier available — no credit card required.

2

Create an Agent

Go to Dashboard → Agents → Create Agent. Give your agent a name, configure greeting messages, and set its personality.

3

Add Knowledge

Upload documents (PDF, DOCX, TXT), crawl a website URL, add FAQ pairs, or import via API. The platform automatically chunks, embeds, and indexes content for RAG retrieval.

4

Deploy the Widget

Copy your agent's widget code and paste it before the closing </body> tag on your website. Your AI agent is now live!

💡
Most customers have their first agent deployed and answering questions within 30 minutes.

Widget Installation

Add the aiAgentOne chat widget to any website with a single script tag:

HTML
<!-- Add before closing </body> tag -->
<script src="https://cdn.aiagentone.in/widget.js"
        data-agent-id="YOUR_AGENT_ID"></script>
ℹ️
Replace YOUR_AGENT_ID with your agent's ID from Dashboard → Agents → Widget Code.

Widget Customization

Configure the widget appearance using data attributes:

HTML
<script
  src="https://cdn.aiagentone.in/widget.js"
  data-agent-id="YOUR_AGENT_ID"
  data-theme="light"           <!-- light | dark -->
  data-position="bottom-right" <!-- bottom-right | bottom-left -->
  data-primary-color="#6366f1"  <!-- Your brand color -->
  data-greeting="Hi! How can I help?"
></script>
AttributeTypeDefaultDescription
data-agent-idstringYour agent ID required
data-themestringlightWidget theme optional
data-positionstringbottom-rightWidget position on page optional
data-primary-colorstring#6366f1Brand color for the widget optional
data-greetingstringHi! How can I help?Initial greeting message optional

AI Agents

Agents are the core of the platform. Each agent is an autonomous AI assistant trained on a specific knowledge base with configurable behavior.

Agent Configuration

  • Name & Avatar — Brand-matching personality for your agent
  • System Prompt — Define tone, domain boundaries, and answer style
  • Greeting Message — Custom first message when users open the widget
  • Fallback Behavior — What happens when the agent can't find an answer in the knowledge base
  • Escalation Rules — Confidence thresholds for automatic human handoff
  • Operating Hours — Schedule when the agent is available vs showing an offline message
  • Categories & Flows — Structured conversation flows for specific use cases

Agent Types

  • Support Agent — Customer service, FAQ handling, ticket creation
  • Sales Agent — Lead qualification, product recommendations, pricing inquiries
  • Knowledge Agent — Internal knowledge base search, documentation assistant

Knowledge Base

The knowledge base is the source of truth for your AI agent. It uses RAG (Retrieval-Augmented Generation) with vector embeddings to find the most relevant content for each user query.

Supported Content Types

  • Documents — Upload PDF, DOCX, TXT, MD files (up to 50MB each)
  • Website Crawl — Provide a URL and we'll automatically crawl and index pages
  • FAQ / Q&A Pairs — Add structured question-answer pairs directly
  • Plain Text — Paste or type text content directly
  • JSON Data — Import structured data from JSON files
  • API Import — Pull content from external APIs

How It Works

  1. Ingestion — Content is parsed and cleaned from its source format
  2. Chunking — Documents are split into semantic chunks optimized for retrieval
  3. Embedding — Each chunk is converted to a 384-dimensional vector using neural embeddings
  4. Indexing — Vectors are stored in PostgreSQL with pgvector for fast similarity search
  5. Retrieval — When a user asks a question, the most relevant chunks are retrieved and passed to the LLM
⚠️
Your agent will only answer from the knowledge you provide. It won't make up information. Keep your content up-to-date for best results.

Conversations

Every chat interaction is tracked as a conversation with full history, metadata, and analytics.

Conversation Lifecycle

  1. Session Start — A new session is created when a user opens the widget or calls the API
  2. Message Exchange — User sends messages, agent responds using RAG + LLM
  3. Confidence Scoring — Each response includes a confidence score (0–1) based on knowledge relevance
  4. Escalation — If confidence drops below the threshold, the conversation can be escalated to a human agent
  5. Session End — Conversation ends manually or after inactivity timeout

Features

  • Conversation History — Full message history with timestamps
  • User Feedback — Thumbs up/down ratings on individual responses
  • Response Sources — See which knowledge chunks were used to generate each answer
  • Human Handoff — Seamless transfer to live agents when needed

Channels

Deploy your AI agent across multiple channels from a single configuration:

  • Website Widget — Embeddable chat widget for any website
  • REST API — Direct API integration for custom applications
  • WhatsApp — Connect your WhatsApp Business account for automated messaging

All channels share the same knowledge base and agent configuration. Conversations from all channels appear in your unified dashboard.

Chat Widget

The chat widget is the fastest way to add AI-powered support to your website. It loads asynchronously, is mobile-responsive, and supports light/dark themes.

Widget API Endpoints

The widget communicates with these backend endpoints:

GET /api/v1/widget/config/{company_id}
Get widget configuration for a company
POST /api/v1/widget/session
Create a new chat session
POST /api/v1/widget/chat/{session_id}
Send a message and get AI response
POST /api/v1/widget/chat/{session_id}/rate
Rate a response (thumbs up/down)
GET /api/v1/widget/agent/{agent_id}
Get agent details for widget display

REST API

The aiAgentOne REST API lets you programmatically manage agents, send messages, and manage knowledge bases. All endpoints follow RESTful conventions and return JSON.

Base URL

URL
https://api.aiagentone.in/v1

Response Format

All responses follow this structure:

JSON
{
  "success": true,
  "data": { ... },
  "message": "Operation completed"
}

Error Handling

Errors return appropriate HTTP status codes with a detail field:

JSON
// HTTP 400, 401, 403, 404, 422, 500
{
  "detail": "Description of the error"
}

Rate Limits

API requests are rate-limited to 100 requests per minute per authenticated user. Widget endpoints have a separate limit of 30 requests per minute.

Authentication

API authentication uses JWT (JSON Web Tokens). Obtain a token by logging in, then include it in the Authorization header.

1. Login to get tokens

HTTP
POST /api/v1/auth/login
Content-Type: application/json

{
  "email": "you@@company.com",
  "password": "your-password"
}

2. Use the access token

HTTP
Authorization: Bearer eyJhbGciOiJIUzI1NiIs...
ℹ️
Access tokens expire after 30 minutes. Use the refresh token endpoint (POST /api/v1/auth/refresh) to get a new access token without re-authenticating.

OAuth Login

Google OAuth is also available for seamless authentication:

GET /api/v1/auth/oauth/google
Initiate Google OAuth flow

Agents API

POST /api/v1/agents
Create a new AI agent
GET /api/v1/agents
List all your agents
GET /api/v1/agents/{agent_id}
Get agent details and configuration
POST /api/v1/agents/{agent_id}/activate
Activate an agent
POST /api/v1/agents/{agent_id}/deactivate
Deactivate an agent

Example: Create an Agent

HTTP
POST /api/v1/agents
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "name": "Support Agent",
  "description": "Customer support for our SaaS product",
  "greeting": "Hi! I'm here to help with any questions.",
  "system_prompt": "You are a helpful support agent..."
}

Chat API

POST /api/v1/chat/start
Start a new conversation
POST /api/v1/chat/{conversation_id}/message
Send a message and receive AI response
GET /api/v1/chat/{conversation_id}/history
Retrieve full conversation history
POST /api/v1/chat/{conversation_id}/end
End a conversation
POST /api/v1/chat/{conversation_id}/feedback
Submit feedback on a response

Example: Send a Message

HTTP
POST /api/v1/chat/{conversation_id}/message
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "message": "What is your return policy?",
  "agent_id": 13
}

Response

JSON
{
  "response": "Our return policy allows...",
  "confidence": 0.92,
  "sources": [
    {
      "title": "Return Policy FAQ",
      "relevance": 0.95
    }
  ],
  "conversation_id": "conv_abc123"
}

Knowledge API

Manage your agent's knowledge base programmatically. All knowledge endpoints are scoped to a specific agent:

POST /api/v1/agents/{agent_id}/knowledge/text
Add text content to knowledge base
POST /api/v1/agents/{agent_id}/knowledge/upload
Upload a document (PDF, DOCX, TXT)
POST /api/v1/agents/{agent_id}/knowledge/url
Add knowledge from a URL
POST /api/v1/agents/{agent_id}/knowledge/website
Crawl and index an entire website
POST /api/v1/agents/{agent_id}/knowledge/qa
Add Q&A pairs
GET /api/v1/agents/{agent_id}/knowledge
List all knowledge sources
GET /api/v1/agents/{agent_id}/knowledge/stats
Get knowledge base statistics
GET /api/v1/agents/{agent_id}/knowledge/search
Search knowledge base with semantic query
DELETE /api/v1/agents/{agent_id}/knowledge/{source_id}
Delete a knowledge source

Example: Upload a Document

cURL
curl -X POST \
  https://api.aiagentone.in/v1/agents/13/knowledge/upload \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -F "file=@product-manual.pdf" \
  -F "title=Product Manual"

Widget API

These endpoints power the embedded chat widget. They don't require JWT authentication — they use agent ID validation instead.

GET /api/v1/widget/config/{company_id}
Fetch widget configuration and styling
POST /api/v1/widget/session
Create a new widget chat session
GET /api/v1/widget/session/{session_id}
Resume an existing session
POST /api/v1/widget/chat/{session_id}
Send a chat message
POST /api/v1/widget/chat/{session_id}/rate
Rate a response
POST /api/v1/widget/feedback
Submit general widget feedback
GET /api/v1/widget/validate
Validate widget configuration

Example: Start a Widget Session

JavaScript
const response = await fetch('/api/v1/widget/session', {
  method: 'POST',
  headers: { 'Content-Type': 'application/json' },
  body: JSON.stringify({
    agent_id: 13,
    visitor_id: 'visitor-uuid'
  })
});

const { session_id } = await response.json();

Webhooks

Webhooks allow you to receive real-time notifications when events occur in your aiAgentOne account. Configure webhook URLs in your dashboard settings.

Available Events

  • conversation.started — A new conversation begins
  • conversation.message — A new message in a conversation
  • conversation.ended — A conversation ends
  • conversation.escalated — Conversation escalated to human agent
  • agent.activated — An agent is activated
  • knowledge.updated — Knowledge base content is added or updated

Webhook Payload

JSON
{
  "event": "conversation.message",
  "timestamp": "2026-02-11T10:30:00Z",
  "data": {
    "conversation_id": "conv_abc123",
    "agent_id": 13,
    "message": "What is your return policy?",
    "response": "Our return policy allows...",
    "confidence": 0.92
  }
}
ℹ️
Webhook deliveries are retried up to 3 times with exponential backoff if your endpoint returns a non-2xx response.