Knowledge: websites, files and text
An agent answers from its knowledge. You can add web pages (crawled from your website), files and plain text.
Plan: every plan for the app; API calls need LUMA Elevate or Enterprise. Credits: 250 per training resource (one file or one web page).
Crawl a website
POST /v1/ai-agent/crawl_website
curl --request POST 'https://api.itechintl.com/v1/ai-agent/crawl_website' \
--header 'Authorization: Bearer lm_live_YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"project_id": PROJECT_ID,
"chatbot_id": "AGENT_ID",
"start_urls": ["https://example.com"],
"max_crawl_pages": 50,
"max_crawl_depth": 3,
"include_urls": ["https://example.com/products/*"],
"exclude_urls": ["https://example.com/careers/*"],
"use_sitemap": true,
"is_main_website": true
}'
| Field | Type | Required | Description |
|---|---|---|---|
project_id | integer | yes | Your project |
chatbot_id | string | yes | Agent ID |
start_urls | array of strings | yes | Where the crawl starts |
max_crawl_pages | integer | no | Maximum pages to read (each page costs 250 credits) |
max_crawl_depth | integer | no | How many links deep to follow |
include_urls, exclude_urls | arrays of strings | no | URL patterns to keep or skip |
use_sitemap | boolean | no | Use the site's sitemap.xml to find pages |
is_main_website | boolean | no | Marks the agent's main website |
The crawl runs in the background. Check progress:
GET /v1/ai-agent/crawl_status/{projectId}/{agentId}
Upload a file
POST /v1/ai-agent/link_file/{projectId} (multipart/form-data)
curl --request POST 'https://api.itechintl.com/v1/ai-agent/link_file/PROJECT_ID' \
--header 'Authorization: Bearer lm_live_YOUR_API_KEY' \
--form 'chatbot_id=AGENT_ID' \
--form 'file=@price-list.pdf'
| Form field | Required | Description |
|---|---|---|
chatbot_id | yes | Agent ID |
file | yes | The document (PDF, Word, text and other common office formats) |
metadata | no | Optional JSON string stored with the file |
The file is processed in the background. The agent answers from it once its status is Active in the app.
Add text
POST /v1/ai-agent/link_content/{projectId}
curl --request POST 'https://api.itechintl.com/v1/ai-agent/link_content/PROJECT_ID' \
--header 'Authorization: Bearer lm_live_YOUR_API_KEY' \
--header 'Content-Type: application/json' \
--data '{
"chatbot_id": "AGENT_ID",
"file_name": "delivery-policy",
"content": "We deliver every day from 9:00 to 21:00. Delivery is free above 200 AED."
}'
| Field | Type | Required | Description |
|---|---|---|---|
chatbot_id | string | yes | Agent ID |
content | string | yes | The text |
file_name | string | no | A name to find it again in the app |
List an agent's knowledge
GET /v1/ai-agent/chatbot_asset_link/{projectId}/{agentId}?pageNumber=1&pageSize=10&assetType=
Returns the files, pages and texts linked to the agent, with their status: data.list[], plus total_records, page_number, page_size and total_pages.
Remove knowledge
DELETE /v1/ai-agent/chatbot_asset_delink removes one item from the agent. Use the item ID returned by the list.