Knowledge and Explore API¶
Knowledge APIs manage semantic models and the sources that make content searchable. Explore APIs manage question sessions, selected data sources, messages, and feedback. A source being present in a model does not mean it is already indexed and searchable.
Semantic models¶
Method and route |
Purpose |
|---|---|
|
List semantic models |
|
Create a semantic model |
|
Read a model |
|
Update a model |
|
Delete a model |
|
Validate model semantics |
|
Import a model definition |
|
Export a model definition |
Entries are managed below
/newmoi/semantic-models/:model_id/entries with list, create, update, and
delete operations. Treat entry kinds and specifications as contract-defined
values; do not invent a free-form kind.
Sources, documents, and segments¶
The source lifecycle includes selection preview, existence checks, append,
list, removal, document read, and governance. Local-file upload is available
through /newmoi/semantic-models/local-files/upload and the model-scoped
variant. Source jobs can be read through .../:model_id/source-jobs and
reconciled through .../source-jobs/reconcile.
Document sources expose segment operations below:
/newmoi/semantic-models/:model_id/sources/:source_row_id/segments
The contract covers initial import, create, edit, enable/disable, delete, re-embedding, and selecting a current segment version. Table sources have different governance behavior; do not apply document segment operations to a table merely because both appear in the same knowledge base.
After adding or changing a source, follow its source job until processing and reconciliation complete. If retrieval remains empty, check source enablement, the current segment version, embedding configuration, and caller permission before submitting the source again.
Explore sessions¶
Method and route |
Purpose |
|---|---|
|
Create a session |
|
List sessions |
|
List pinned sessions |
|
List unpinned sessions |
|
Read a session |
|
Update a session |
|
Pin or unpin |
|
Delete a session |
Message APIs list session messages, obtain the latest message ID, read/delete a message, and submit like/dislike feedback. Message-list operations require the identifier shape documented by the deployed endpoint; do not coerce an opaque session ID to an integer unless the contract requires it.
Querying selected data¶
Explore source discovery uses /newmoi/table/overview,
/newmoi/table/database/tables, and /newmoi/table/columns. Build the query
source selection from server-returned catalog, database, table, and semantic
model IDs. Do not choose a source only by display name when multiple matches
exist.
Explore answers can be streamed as SSE/A2A-style events containing planning, source, and answer updates. Parse events by their protocol type, preserve citations as structured data, and stop at the terminal event. An interrupted stream can have created a session or partial message; read the session before retrying the question.
Agent-bound knowledge use is described in Agents and A2A. Model provider and embedding setup is described in Models and providers.