SemText

Showcase

An agent record, and what it may assert

A SemText document can carry its own agent: the agent element holds a name, a one-line bio and the instructions the model must follow, and the document body holds exactly what those instructions may draw on. The contract is auditable by a human — the instructions say “cite fact ids”, and the facts are right there with their ids.

The document

The agent element is inert to the browser and a record to the extractor — it never renders, which is why the visible page reads as the answerable material alone.

agent example

agent.md · authored SemText
source
<sem-enhanced-document>
<agent>
<name>Auth Desk</name>
<bio>Answers authentication questions from the facts on this page.</bio>
<instructions>Answer only from sem-fact ids; cite the id with every answer. If no fact covers the question, say so.</instructions>
</agent>
<h1 data-kind="title">Auth desk</h1>
<p>The records this agent answers from:</p>
<sem-facts view-as="list">
<sem-fact id="a-hdr" kind="concept">
<statement>Where does the OIDC token travel?</statement>
<conclusion>In the Authorization header, as a bearer token.</conclusion>
</sem-fact>
<sem-fact id="a-store" kind="anti-pattern">
<statement>Where should a browser keep tokens?</statement>
<conclusion>Memory or an httpOnly cookie — localStorage is readable by any script on the page.</conclusion>
</sem-fact>
</sem-facts>
<sem-reveal summary="Which fact covers token storage?" collapsed>
a-store — the anti-pattern record above; cite it for any question about where a browser keeps tokens.
</sem-reveal>
</sem-enhanced-document>
render

Render view: this block wires to the SemText runtime bundle in the full example viewer (port-reference lane) — the source beside it is the same file, byte for byte.

Why this works

  • statement and conclusion children make every fact an assertable pair — the conclusion is the citable takeaway.
  • The id attribute is a stable anchor: a #a-store deep link reaches the fact through any closed reveal.
  • sem-reveal is the non-assertive counterpart to the fact pair — a disclosure, not a claim extraction would return.

Elements used: agent, sem-facts, sem-reveal. Their contracts live on the reference pages .