Search API

Open in CMS

The Knowledge Search API screen lets your own systems search this agent's knowledge with an API key and get the matching chunks back, with no AI-generated answer. Found in the agent sidebar under Channels β†’ Search API. It works for service agents only; on a personal agent a notice explains this and the controls stay off.

The page has three tabs: Access, Permissions, and Log. The switch and the keys apply at once. The Permissions and Log tabs each have a small form saved with the Save all changes bar at the bottom; switching tab with unsaved changes asks first.

Access tab

Allow search through the APIOff by default. When off, every search is refused, even with a valid key. The hint shows when it was last changed. While it is on without an active key, a notice asks you to create one.
EndpointThe address your system POSTs a query to, with a copy button.
Agent IDThe agent's ID, with a copy button.
cURLA ready-to-run example request. It reads the key from the QLAR_SEARCH_KEY environment variable.
Keep the key on your serverA warning: whoever holds the key can send any permission code, so call the API only from your own back end.
API docsOpens Knowledge Search API in a new tab.
CostEach search costs 1 credit, also when it finds nothing. Free when your organization's own embedding model serves the search. Refused requests cost nothing.

Primary and Secondary keys

Two slots, so you can rotate keys without downtime. Each slot shows a status chip: Active, Expired, Revoked, or Empty.

Name, Key, Created, ExpiresThe key's name, its last four characters (qks_…abcd), when it was made, and when it expires (or Never).
Create key / Replace keyOpens a dialog with Name (up to 80 characters) and Expiry (7, 14, 30, 90, 180, or 365 days, or Never expires; default 90 days). Replacing an active key warns that the old key stops working right away.
Copy your new keyShown once after a key is made. Copy it before you close: the key cannot be shown again. Closing asks first.
RevokeAsks for confirmation, then stops the key at once. A revoked key cannot be turned back on.

Used by other agents

Shown when other agents search this one through Knowledge β†’ External. One row per key Qlar made for them: Agent, Key (last four characters), Made, Status (Active or Revoked). The row menu has Revoke, which asks first and stops that agent's searches at once. See External Knowledge.

Permissions tab

How permissions work in a searchAn info notice: every search carries the codes picked here, and the caller's own codes are added on top.
Permission codesPick codes from the agent's permission list. They are added to every search made with this agent's keys. Leave it empty to use only the caller's codes.
No permission codes yetShown when the agent has no permission codes. Open Permissions goes to Users β†’ Permissions.
Codes no longer in the listA warning when a saved code was removed from the agent's permission list.

Log tab

Log settings

Keep entries forHow long entries are kept. When you shorten it, a warning says older entries are deleted, and saving asks for confirmation. A longer period applies to new entries only.
Store query textOn by default: the log keeps the query text. Off: the log keeps everything about a call except what was searched for, and shows Not stored.

Search calls

Filters: From and To dates, and Outcome (All, Success, Failed). Refresh reloads the list; Load more shows older entries.

ColumnWhat it shows
TimeWhen the call was made, in your time zone.
OutcomeA Success or Failed chip.
StatusThe HTTP status code returned.
KeyThe key's name and last four characters.
QueryThe query, or Not stored.
ResultsHow many chunks came back.
CreditsCredits charged (0 or 1).
ModelQlar or Your model: whose embedding served the search.
DurationHow long the search took.
ErrorThe error code and message of a failed call.

Click a row to open it: the chunks returned (nearest first), the nearest distance, the permissions the caller sent, the permissions the search used, the limit, and the caller's IP address and user agent.


Related guide: Knowledge Search API