The Context Layer is the AI agent’s knowledge base. It stores context notes — discrete facts, preferences, observations, and document chunks — that the agent retrieves at inference time to reason over your data. Notes are scoped either global (workspace-wide) or ontology (tied to a single ontology via a scope_id).
This note scope model (global | ontology + scope_id) is specific to the Context Layer. A note scoped to ontology with a given scope_id is only retrieved when the agent operates on that same ontology. The scope_id is the ontology ID — the same identifier you pass to the AI Agent chat endpoint.
All paths are relative to the base URL and require authentication. All responses use the standard envelope.
The platform also ships an onboarding interview wizard that populates context notes interactively. Those endpoints (GET /knowledge/interview/template, POST /knowledge/interview) are UI-internal and not documented here.

Note fields

Every context note has these fields:

Activation

activation controls how a note enters the agent’s context:
Notes with activation of always or on_demand enter the system prompt, so on create/update they are passed through a safety screen. If rejected, the request returns 400 with a message like Rule rejected by screening: <reason>. retrieved notes are never screened.

Context notes

List notes

Return active context notes for the given scope, optionally filtered by kind or activation.

Create a note

Write a single context note into the knowledge base.
On the free tier, creating notes consumes the embedding quota. When it is exhausted the endpoint returns 402 with code: "..._LIMIT_REACHED".

Get a note

Retrieve a single context note by ID.

Update a note

Partially update a context note in place (the note keeps its ID). Only fields present in the request body are modified. Omitting scope/scope_id leaves them unchanged; passing them explicitly (even as null) overwrites them.

Delete a note

Permanently delete a context note.
Run a vector similarity search over context notes. Returns notes ranked by semantic relevance to the query string, each annotated with a similarity score.
Match notes on their literal words rather than their meaning. Use it when you know the term you are looking for — a column name, an identifier, a piece of jargon — where semantic search would return things that are merely related.

Standing rules

Rules are the subset of notes that the assistant is expected to honour on every request, rather than retrieve when relevant — “always filter out test accounts”, “prefer the orders_v2 table”. This endpoint returns the ones in force.
If you are building your own assistant on top of Prometheux, fetch these once per session and apply them to every request — that is what the built-in assistant does. They are the user’s standing instructions, so ignoring them is visible to the user as the assistant forgetting what it was told.
Notes can be linked to each other and to the things they describe — a concept, an ontology, a data source. A link is an edge: a typed, directed triple of source node, relation, and destination node. Edges are what makes a note about customer_churn show up on that concept’s Context tab. Edges are created two ways: deliberately, through the endpoint below, or implicitly, by writing a [[wikilink]] in a note’s text. The distinction is recorded in created_by — a wikilink edge is tied to its text anchor and disappears when the link text does, while a user edge lives on its own.

List edges

Returns edges in both directions, so backlinks are included. With no node filter it returns every edge in the workspace — which is how the notes page draws its graph view, and more than you want for anything else.

Create an edge

Creating an edge that already exists is not an error — the existing edge is returned with 200, so repeating the call is safe.
A concept node’s ID is <ontology_id>:<predicate_name>, not the concept’s UUID.

Delete an edge

Notes attached to something

Returns the active notes linked to one non-note node, in either direction — everything the concept Context tab shows, in a single request rather than an edge listing followed by a fetch per note.

Ingestion

Ingest a file as context

Parse and chunk an already-uploaded file into context notes. The file must first be uploaded via POST /data/files/upload, which returns a disk/<name> path to pass here. The ingestion pipeline extracts text, splits it into chunks, embeds each chunk, and persists them as document_chunk notes tied back to a shared document_id. If the embedding service is unavailable the file is still stored as a single un-vectorized note.
Returns 422 Unprocessable Entity when the file is readable but no text can be extracted — the most common cause is a scanned PDF without an OCR layer.

Auto-seed from data sources

Profile connected data sources and automatically write observation notes into the Context Layer. The platform inspects schemas, samples, and statistics for each source and uses the LLM to generate structured observations. This endpoint returns a streaming NDJSON response. Each line is a JSON object with a type field describing the event.
Each NDJSON line follows this shape:

From notes to concepts

Two read-only endpoints that help turn written knowledge into Vadalog. Neither creates anything: both hand back the material for a concept, which you then author with POST /concepts/{ontology_id}/save.

Extract concept candidates from a document

Runs an extraction pass over a document already ingested with /knowledge/context/from-file and returns the concepts it suggests — each with a name, a description, and the snippet it came from — checked against the concepts the project already has.
The document must be ingested first — this endpoint works from stored chunks, not from a file path. Extraction is an LLM pass, so expect it to take seconds, not milliseconds.

Promote a note to a concept

Returns one note’s text alongside the project’s existing predicates, so a concept can be written from it with the names it should join against already in hand.
An unknown note ID returns 404; a note that holds nothing a concept could be built from returns 400.

Project document

Render project document

Return a combined document view for a project: an LLM-generated natural-language summary alongside the full executable Vadalog program assembled from all concepts. The summary is cached and is automatically invalidated when concepts or context notes change. Pass refresh=true to force regeneration regardless of the cache state.