Skip to main content

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
}'
FieldTypeRequiredDescription
project_idintegeryesYour project
chatbot_idstringyesAgent ID
start_urlsarray of stringsyesWhere the crawl starts
max_crawl_pagesintegernoMaximum pages to read (each page costs 250 credits)
max_crawl_depthintegernoHow many links deep to follow
include_urls, exclude_urlsarrays of stringsnoURL patterns to keep or skip
use_sitemapbooleannoUse the site's sitemap.xml to find pages
is_main_websitebooleannoMarks 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 fieldRequiredDescription
chatbot_idyesAgent ID
fileyesThe document (PDF, Word, text and other common office formats)
metadatanoOptional 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."
}'
FieldTypeRequiredDescription
chatbot_idstringyesAgent ID
contentstringyesThe text
file_namestringnoA 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.