Knowledge API

Fetch, cite, verify

Every entry in the global knowledge base has a stable id and a content hash. That lets an agent fetch a fact, cite it, and check later that it has not changed.

The workflow

1.Search or resolve to find an entry and get its id.
2.Fetch the entry verbatim, or ask for its citation.
3.Store three values with your answer: id, content_hash and kb_snapshot.
4.Later, send the id and content_hash to verify. It tells you whether the fact still matches.

The guarantee underneath: an identical query against the same kb_snapshot returns identical results in a stable order. The same operations are available as MCP tools. For the terms used here, see the glossary.

GET /v1/knowledge/fetch

Fetch an entry

Returns one entry verbatim by its stable id.

curl "https://cold-api.coldstate.ai/v1/knowledge/fetch?id=eng_000229f438f7cebd" \
  -H "Authorization: Bearer cs_live_..."
Response fields
idstring — Stable entry id.
title, snippetstring — Title and a short excerpt.
contentstring — The full entry text.
content_hashstring — sha256 of content. Store it to verify later.
kb_snapshotstring — The knowledge-base version the entry was read from.
metadataobject — domain and source.
created_atstring — When the entry was created.
GET /v1/knowledge/cite

Cite an entry

Returns a canonical citation without the full text: what you need to attribute a fact and re-check it.

curl "https://cold-api.coldstate.ai/v1/knowledge/cite?id=eng_000229f438f7cebd" \
  -H "Authorization: Bearer cs_live_..."
Response fields
id, titlestring — The entry and its title.
metadataobject — domain and source.
content_hashstring — Fingerprint of the entry text at citation time.
kb_snapshotstring — Knowledge-base version cited.
built_at, created_atstring — Build and creation timestamps.
POST /v1/knowledge/verify

Verify a citation

Send the id and the content_hash you stored. The response says whether the entry still exists and still matches.

curl -X POST https://cold-api.coldstate.ai/v1/knowledge/verify \
  -H "Authorization: Bearer cs_live_..." \
  -H "Content-Type: application/json" \
  -d '{"id": "eng_000229f438f7cebd", "content_hash": "<hash you stored>"}'
Response fields
foundboolean — Whether the entry exists in the current knowledge base.
matchesboolean — Whether its current hash equals the one you sent.
current_hashstring | null — The entry's hash now.
kb_snapshotstring | null — The snapshot it was checked against.
GET /v1/knowledge/snapshot

Pin a snapshot

Returns the current knowledge-base version. Record it alongside a run so the run can be reproduced or audited later.

curl https://cold-api.coldstate.ai/v1/knowledge/snapshot \
  -H "Authorization: Bearer cs_live_..."
Response fields
kb_snapshotstring — Snapshot id.
versionstring — Knowledge-base version.
built_atstring — When the snapshot was built.
entry_countinteger — Entries in the snapshot.
GET /v1/knowledge/resolve

Resolve a name to an entry

Turns a name or alias into a canonical entry id you can pass to the other endpoints.

curl "https://cold-api.coldstate.ai/v1/knowledge/resolve?query=photosynthesis" \
  -H "Authorization: Bearer cs_live_..."
Parameters and response
querystring, required, max 500 chars — The name or alias to resolve.
limitinteger, 1–5 — Max alternatives to return.
resolvedentry | null — The canonical entry, if one was found.
match_typeexact | best | none — How the entry was matched.
alternativesarray — Other candidate entries.
POST /v1/knowledge/batch

Run several queries on one snapshot

Sends up to 10 queries in one call, all answered from a single consistent snapshot.

curl -X POST https://cold-api.coldstate.ai/v1/knowledge/batch \
  -H "Authorization: Bearer cs_live_..." \
  -H "Content-Type: application/json" \
  -d '{"queries": ["photosynthesis", "cellular respiration"], "limit": 5}'
Request and response
queriesarray of strings, required, 1–10 — Each up to 2000 characters.
domainstring — Optional domain filter for all queries.
limitinteger, 1–20, default 5 — Max results per query.
kb_snapshotstring — The snapshot every query in the batch was answered from.
searches[]array — One item per query: query, total and results.

Stats, domains and capabilities

Supporting endpoints
GET /v1/search/domainsKnowledge domains with entry counts.
GET /v1/knowledge/statsWith a query: coverage stats for it. Without: global knowledge-base stats. Optional query and domain parameters.
GET /v1/knowledge/capabilitiesMachine-readable manifest of the service, for agents that self-configure.

See the API reference for every endpoint, or the quickstart to make your first search.