Skip to content

AI Service

Menu: Settings -> AI Service (advanced menu) Same page from: Operations Center -> AI Service Deep link: /_Admin/system/ai-service?SiteId={siteGuid} Tab deep links: name=settings / functions / vectorSearch / llms / markdown / jsonld

AI Service configures site-level AI capabilities: vector search, MCP server, AI functions, llms.txt, automatic Markdown output, and global JSON-LD mapping. It appears under both Settings and Operations Center but is the same page; this doc is the single source of truth.

Permissions

ActionPermission
Open AI Serviceai
View custom AI function listai·view
Add, edit, delete AI functionsUI checks mcp·edit; backend mcp/PostTool, mcp/DeleteTools check ai·edit
Run custom AI functionsUI checks mcp·view
Save MCP Service and Vector Search settingsBottom save checks mcp·edit and saves site AI settings
Save llms.txt, Markdown, JSON-LD configRequires access to this page; Markdown / JSON-LD toggles save site AI settings

Scope

Tabs with UI and server APIs today: MCP / AI Functions, llms.txt Generator, Automatic Markdown Engine, Global JSON-LD Mapping. Pay-per-crawl is not exposed in the UI and is omitted here.

How to Open

  1. In Edit Menu, enable Settings -> AI Service or Operations Center -> AI Service.
  2. Open the matching left menu item. Both go to /_Admin/system/ai-service.
AI Service settings page

Page Structure

Tabs update the URL name parameter when switched.

AI Service tabs
TabPurposeNotes
SettingsEnable vector search, pick Embedding Provider / Model, enable MCP serviceDefault tab
AI FunctionsManage custom functions, view built-ins, trial-run custom functionsWrites to site AIFunction store
Vector SearchIndex status by object type, sync or rebuildShown only after vector search is enabled under Settings
llms.txt GeneratorGenerate, edit, save site root /llms.txtBuilds index from live pages
Automatic Markdown EngineEnable .md route output and override rulesSaves site AI.MarkdownEngine
Global JSON-LD MappingMap content / database fields to Schema.org propertiesSaves site AI.JsonLD and mappings

Settings

Configure underlying capabilities here before using other tabs.

AI Service Settings tab
ItemDescription
Enable vector searchSaves ai.vectorSearch.enable; shows Vector Search tab
ProviderAI Provider that supports Embedding Models; if empty, check org-level AI Providers
ModelEmbedding model for that Provider; switching Provider picks the first available model

After save, new/updated content is indexed per vector search rules; run sync or rebuild on Vector Search for existing objects.

MCP Service

ItemDescription
Enable MCP serviceEnables site MCP Server for external MCP clients
Development Connection InformationOn non-production servers: Endpoint and Authorization Header
Disable built-in AI toolsHides system tools; only user-created AI functions are exposed

Endpoint is derived from site Base URL with _mcp appended; http Base URLs are shown as https in the UI. The Bearer token in dev connection is the current login credential—debug only; do not put it in docs, screenshots, or repos.

AI Functions

The AI Functions tab has Custom and Built-in sections. Custom functions can be exposed via MCP and called from site AI; built-ins are system-provided (name and description only).

AI Functions custom list

Without mcp·edit, Add Tool is disabled; assign permissions in Roles first.

Custom List

Control / columnDescription
Add ToolOpens AI tool dialog
Custom / Built-inToggle list in the top-right
NameCustom tool name; avoid renaming after first save
TagsFrom mcp/FunctionTags; used for categorization and discovery
DescriptionNatural language for AI / callers
RunShown when exactly one row is selected; opens params and result dialog
Edit / DeleteEdit tool or multi-select delete

AI Tool Dialog

FieldDescription
NameRequired on create, unique, 1–50 chars; disabled when editing
DescriptionWhat it solves, when to call, what it returns
TagsMulti-select for discovery
Execution codeMonaco TypeScript with KScript mode; API details in related links
Input SchemaJSON Schema for run parameters; run dialog generates sample input

Description and Input Schema affect call quality more than code. Define boundaries, required params, and return shape before code; never hardcode secrets, external tokens, or long-lived credentials.

Run Check

Run reads Input Schema and builds JSON parameters. Adjust and Run; backend calls mcp/RunTool and shows the result. If Schema has no properties, the dialog runs immediately and shows results.

Built-in Tools

AI Functions built-in list

Built-ins list Name and Description only. To block MCP clients from built-ins, enable Disable built-in AI tools under Settings.

Vector Search

The Vector Search tab appears only after Settings -> Enable vector search is saved. Lists index status by object type.

Column / actionDescription
NameObject type: product, page, view, content, etc.
TotalCount of indexable objects
UnsyncedNo vector yet, or object updated / model mismatch
QueuedSubmitted but incomplete index jobs
StatusRunning, error, pending sync, or complete
SyncProcess unsynced items for selected types
RebuildDelete existing vectors for selected types and re-index all

After changing Embedding Provider or Model, Rebuild key object types when models no longer match.

llms.txt Generator

llms.txt gives AI crawlers a site content index. The admin reads and saves /llms.txt.

llms.txt generator
ControlDescription
GenerateDraft llms.txt from live pages; each page links to its .md URL
Text areaManual edit of final content
SaveWrites text area to root /llms.txt

Before generating, confirm pages are live, routes are correct, and Automatic Markdown Engine is enabled if you want .md links to work for AI clients.

Automatic Markdown Engine

When enabled, appending .md or index.html.md to a page path finds the original route and converts rendered HTML to Markdown.

Automatic Markdown engine

Enable Toggle

Top-right Enable saves AI.MarkdownEngine.Enable immediately. When off, .md routes are not rendered as Markdown.

Override Rules

Override rules assign objects or disable rules for specific paths.

Markdown override rule dialog
FieldDescription
Match pathFront-end path to override; use real URLs to match page routes
Applicable objectObject id for that path
StatusEnable or disable the override

Add, edit, delete rules update the form only; click bottom Save to persist to the site.

Global JSON-LD Mapping

Maps Kooboo content or database fields to Schema.org types and properties. When enabled, pages emit application/ld+json structured data.

Global JSON-LD mapping

Enable Toggle

Top-right Enable saves AI.JsonLD.Enable. Complete at least one data source mapping before enabling on production.

Data Sources and Field Mapping

AreaDescription
Kooboo data sourcecontent, indexeddb, sqlite, mysql, sqlserver, mongo, etc.
DataContent folder or table
Schema typeFrom Schema.org tree: Article, Product, Organization, etc.
Kooboo variable/fieldFields from the data source
Schema propertySchema.org property per field

Content fields come from Content Types; database fields come from table structure. If expected fields are missing, verify models in Content or Database first.

Typical Workflow

  1. Confirm site Base URL and AI Provider / Embedding model availability.
  2. Under Settings, enable MCP service and/or vector search; save.
  3. Under AI Functions, create tools: name, description, tags, Input Schema, then code and Run to verify.
  4. If vector search is on, Sync or Rebuild on the Vector Search tab.
  5. For AI crawlers: enable Automatic Markdown Engine, then generate and save /llms.txt.
  6. For structured data: prepare fields in content types or tables, then map in Global JSON-LD Mapping.

CMS vs API / Template Engine

ScenarioCMSAPI / Template Engine
Enable MCP, copy dev connection infoSettings on this page
Create AI functions, descriptions, Input SchemaAI Functions on this pageDevelopment -> Code, k.site Code API, KScript API
Read content, database, commerce in functionsFunction entry only on this pagek.content, k.DB, k.commerce
Page Markdown or llms.txt outputToggles and save paths on this pagePage, View, Template binding
JSON-LD fields from content or tablesData source and mapping on this pageContent Types, Database, k-data
DocDescription
Settings overviewSettings menu and sub-routes
Operations CenterSame-page entry for AI Service
Basic Settings · GeneralBase URL and site info
Development -> CodeKScript / TypeScript code resources
Content TypesJSON-LD content field sources
DatabaseJSON-LD database field sources
KScript APIAPIs available in AI function code