SemText

Reference · Agent Kit

<agent-kit-custom-assert>

Agent Kit element

You author the expr and expect pairs; the card renders them as a structured list from the cached snapshot.

A list of custom assertions, each an expression and an expectation. You author the expr and expect pairs; the card renders them as a structured list from the cached snapshot. optional same-origin JSON path naming a cached snapshot for enrichment (cached-embed preset; a fixture source vetoes any `endpoint`). optional same-origin API path; NEVER fetched by this element (Live-fetch policy below) — declared for the authoring pipeline only. authored ISO-8601 stamp of the most recent sync (cached-embed preset). one of `fresh`, `stale`, `error` (cached-embed preset). `project`, `key`: `string` — the reference quartet (schema `reference` preset) — see Reference attributes below. per the global attribute catalog (conventions.md §2) per the global attribute catalog (conventions.md §2) per the global attribute catalog (conventions.md §2)

Children

  • <agent-kit-assert-expr>`<agent-kit-assert-expr>` — the expression under test; at least one.
  • <agent-kit-assert-expect>`<agent-kit-assert-expect>` — the expectation for the preceding expression; at least one.

Example

agent-kit-custom-assert.html
source
1 <agent-kit-custom-assert org="acme" project="semtext" key="assert-extract">
2 <agent-kit-assert-expr>extractRecords(doc)</agent-kit-assert-expr>
3 <agent-kit-assert-expect>deep-equals the JS-off set</agent-kit-assert-expect>
4 <agent-kit-assert-expr>norm(text)</agent-kit-assert-expr>
5 <agent-kit-assert-expect>collapses authored whitespace only</agent-kit-assert-expect>
6 </agent-kit-custom-assert>
render
No shipped runtime for this element — the authored example renders as plain HTML.

Source: spec/schema/agent-kit/custom-assert.md