Skip to Content
Heuristic documentation

manage_knowledge_base

Changes data

Start or stop reading a product's documentation site, and set how often it is read again (Admins only).

Set action to one of these:

  • start_read (needs productId): Start a knowledge base read: it crawls the product's documentation site, up to 1,000 pages, turns each page into at most one feature and groups new features into categories. While a read is active it answers that read instead. A knowledge base can be read once an hour, from the start of its latest read that did not fail: sooner is refused (read_limited, with details.readAvailableAt and details.retryAfter), as is a read while categories are being rebuilt. The read takes minutes: check read_knowledge_base with action read every 30 seconds; it is done when its status is completed, failed or stopped. Then read the result with get_hierarchy. Counts toward the lower limit on calls that start AI runs or knowledge base reads.
  • stop_read (needs productId, runId): Stop an active knowledge base read: it ends as stopped. Pages read so far and the features found in them are kept. Pages not read yet are skipped. Features not yet in categories stay outside them until the knowledge base is read again or categories are rebuilt. The AI usage so far is still recorded. The knowledge base can be read again right away: a stopped read does not count towards the hourly read limit. Pages that haven't changed aren't read by the AI again. A read that has already ended is refused (conflict).
  • set_refresh (needs productId, body): Set how often Heuristic reads the knowledge base again on its own, as an ordinary read (startedAutomatically true, no startedBy): every is off, daily, weekly or monthly (the default). nextRefreshAt is about when the next starts: a day, week or month after the day the latest read started, at the product's own time of day; null when off. A refresh due during a read or category rebuild, or within the hourly read limit, is tried once more an hour later. A change starts no read and leaves the hourly limit as it was (a refresh time already passed moves to the product's next time of day). Setting the same value again changes nothing, so a retry is safe.

Actions (set action)

start_read

Who can use it
Admins
Hints
Changes dataReaches outside Heuristic
Runs
start_knowledge_base_read
Inputs
  • productId string, required

    From read_product with action list or get_me.

stop_read

Who can use it
Admins
Hints
Changes data
Runs
stop_knowledge_base_read
Inputs
  • productId string, required

    From read_product with action list or get_me.

  • runId string, required

    The read's id, from read_knowledge_base with action reads or manage_knowledge_base with action start_read.

set_refresh

Who can use it
Admins
Hints
Changes dataSafe to repeatReaches outside Heuristic
Runs
set_knowledge_base_refresh
Inputs
  • productId string, required

    From read_product with action list or get_me.

  • body object, required

    The new setting.

    • every string, required

      How often: off, daily, weekly or monthly (the default for a new product).

      Allowed values: off, daily, weekly, monthly