1. emem
  2. Connect
  3. Reference
for developersevery endpoint, with worked calls

Connect · REST and MCP

API reference

Every route and tool emem.dev serves, sorted by what it does, with the calls agents use most, the token grammar and the transparency log.

contract
OpenAPI 3.1
/v1 paths
…
MCP tools
…
reads
no account, no API key

00By role

Every route and tool, sorted by ordered rules into what writes signed memory and what reads and checks it. Nothing here is listed by hand.

reading /openapi.json and /v1/tools…

encode writes signed memory

emem

name · sign · log

token families ↓

log head…

decode reads, cites, checks

read

01Tokens

A token is a short address one agent hands another. Resolving it returns the signed bytes it names. The family says what it binds, and the families are not equally strong.

cell form emem:fact: defi.zb521.jawI.gOze : vtnf7yhai6dpnedjt35ox5rw7a2px4k6iswukzhzqw7qytovlpfa family cell64: the address fact_cid: BLAKE3-256 of the signed body, base32 descriptor form emem:fact: 25.41753,51.50748 @ 2021-04-30 @ copdem30m~elevation~mean : vtnf7yhai6dpnedjt35ox5rw7a2px4k6iswukzhzqw7qytovlpfa family lat,lng (5+ decimals) capture date band fact_cid: the same 52 characters
cell form
emem:fact: family
defi.zb521.jawI.gOze cell64, the address
vtnf7yhai6dp…qytovlpfa fact_cid, BLAKE3-256 of the signed body
descriptor form
25.41753,51.50748 lat,lng, 5 or more decimals
2021-04-30 capture date
copdem30m~elevation~mean band
vtnf7yhai6dp…qytovlpfa the same fact_cid
Figure 1. One fact, two spellings. Both resolve to the same signed bytes (an elevation reading at Lusail). The fact_cid is the only authority. Every other segment is checked against the signed body on resolve, and a mismatch returns 409.
TokenNamesBindsMintResolve
emem:fact:<cell64>:<fact_cid>one signed reading at a placethe whole body, full 32-byte BLAKE3/v1/memory_token/v1/memory_token/resolve
emem:fact:<lat>,<lng>@<date>@<band>:<fact_cid>the same reading, readablethe body; place, band and date checked against it/v1/memory_token with band and observed_on/v1/memory_token/resolve
emem:bundle:<bundle_cid>a set of factswhich facts, 16-byte anchor; each member binds its own body/v1/memory_bundle/v1/memory_bundle/<token>
emem:raster:<aoi_cid>:<band>:<tslot>:<derivation_cid>one field over an area at one timearea, band and time, checked against a signed derivation record/v1/band_raster/v1/raster/resolve
emem:cube:<aoi_cid>:<band>:<lo>..<hi>:<derivation_cid>a field over timea signed manifest over raster slices; membership recomputed on resolve/v1/band_cube/v1/cube/resolve
emem:rasterset:2 to 64 fields as onea signed manifest of member raster tokens/v1/raster_bundle/v1/raster_bundle/resolve
emem:state:one step of an answerthe cids of its inputs and the step before it/v1/ask/v1/state/<cid>
emem:trace:a device's execution tracea verified, chained trace; never the pixels/v1/substrates/v1/trace_resolve
emem:attestation:a device's platform evidencewhich hardware root of trust vouched for its key/v1/device_platforms/v1/device_platforms
emem:entity:<entity_cid>one real-world objectan identity, 16-byte anchor: a shared reference, not shared bytes/v1/entity/v1/entity/resolve
emem:cell:<cell64>a placenothing: an address until a fact hangs on it/v1/locate/v1/recall

Field tokens

A raster or cube names an array, so its receipt attests a derivation: this responder computed the artifact whose BLAKE3 is artifact_cid, from a pinned scene, over an area (aoi_cid) and a time slot.

Pixels live in an evictable store at GET /v1/artifacts/{cid}. The signed record persists, so an evicted artifact is rebuilt on dereference rather than lost. To verify, resolve the token and re-hash the artifact against artifact_cid.

Descriptor tokens

A cell64 is a string no model saw in training. Coordinates, a date and a band name are, so the descriptor form reads without a lookup. Both forms resolve to the same bytes.

Resolve checks every claim against the signed body first. The coordinates must quantise to the fact's cell, the band must match, and the date must match a source capture time. A mismatch is 409.

Coordinates with fewer than 5 decimals are refused with 400: 4 decimals is about 11 m, which can land on the neighbouring cell.

Provenance and legacy prefixes

Resolving a fact token also returns its provenance class. direct_sensor and deterministic_index facts are recomputable from the cited source. model_output and human_curated facts carry a caution note in the same payload.

deterministic: true (or a provenance list) on POST /v1/recall keeps only the matching classes, and the filter runs before the receipt is signed. The old prefixes memt:, memb: and meme: still resolve.

A signature proves who signed and that the bytes are unchanged. It does not prove the value is correct.

02Client setup

The same JSON works in every host that speaks MCP. For a runtime without Streamable HTTP, use the mcp-remote stdio bridge. No key and no install.

Claude Code.mcp.json
Cursor.cursor/mcp.json
Claude Desktopclaude_desktop_config.json
Cline (VS Code)MCP settings
Gemini CLIextension install
OpenAI / ChatGPTAction import
stdio bridgemcp-remote
Plain RESTPOST /v1/*
JSON .mcp.json
{
  "mcpServers": {
    "emem": {
      "type": "http",
      "url": "https://emem.dev/mcp"
    }
  }
}

The MCP layer wraps the same handlers as /openapi.json. Start with emem_ask: it resolves the place, recalls the bands and runs the matching algorithm in one call.

/v1/attest accepts facts only from this responder's key, an enrolled device or a key the operator lists; any other signature gets 403. Per-agent notes and derivations are signed with the agent's own key.

03Endpoints agents call most

Each has a matching MCP tool. The full surface is /openapi.json; the tool descriptors are at /v1/tools.

MethodPathMCP toolBody / use
POST/v1/locateemem_locateplace name → cell64, neighbourhood and live band inventory
POST/v1/recallemem_recall{cell, bands?, tslot?, include?, deterministic?, provenance?} → signed facts; fetches and signs on a miss; include:["edges","freshness"] adds typed edges and a staleness score
POST/v1/recall_manyemem_recall_manyup to 256 cells per call; one receipt per cell, no aggregate receipt
POST/v1/recall_polygonemem_recall_polygonsampled cells inside a polygon (cells_sampled, is_exhaustive); budget_ms returns a typed partial result
POST/v1/find_similaremem_find_similark-NN over 128-D Tessera embeddings; cosine, hamming or hamming_then_rerank; k from 1 to 1000
POST/v1/askemem_askquestion about a place → answer, reasoning stages and receipts; topics at /v1/topics
POST/v1/huntemem_huntevent + region → top 8 of up to 32 sampled cells
POST/v1/stateemem_statedense vector at a cell; view=encoder (128-D, default) or view=cube (1792-D)
POST/v1/state_multiemem_state_multione vector per served encoder (today geotessera); typed missing[] for the rest
POST/v1/state_diffemem_state_diffvector delta at one cell between two tslots: residual, L2 and cosine
POST/v1/memory_tokenemem_memory_tokenmint emem:fact:<cell64>:<fact_cid>
POST/v1/memory_token/resolveemem_memory_token_resolveone round trip; returns the signed body the cid names
POST/v1/trajectoryemem_trajectory{cell, band, window} → stored time series; does not fetch past tslots
POST/v1/diffemem_diffsigned delta of one band between two tslots
POST/v1/verifyemem_verifystructured claim → verdict, evidence fact_cids and a receipt
POST/v1/verify_receiptemem_verify_receiptrebuild the preimage, check Ed25519 over BLAKE3
GET/v1/stream(SSE)signed corpus.state ticks; interval 5 to 300 s, default 15 s
GET/v1/corpus_state_statsemem_corpus_state_statsone signed snapshot of the stream payload: cells, bands, facts scanned
GET/v1/cells/:cell64/scene.pngemem_cell_scene_rgbSentinel-2 true-colour thumbnail, 256×256 PNG
GET/v1/coverage_map.svgemem_coverage_map1440×720 plate-carrée map of corpus density, 1° bins

One-shot domain tools

Each wraps locate, recall and aggregate into one call that takes {place} or {lat, lng}. The receipts and fact_cids are the same as a manual recall.

MCP toolRESTTopicSource
emem_at/v1/atstandard bands at a placethe at-a-glance band set, or the bands you pass
emem_ndvi/v1/ndvivegetationSentinel-2 NDVI, 10 m
emem_air/v1/airair qualityCopernicus CAMS PM2.5, NO2, O3
emem_lst/v1/lstland-surface temperatureMODIS LST day and night, 8-day, 1 km
emem_soil/v1/soiltopsoil, 0 to 30 cmSoilGrids 2.0, 250 m
emem_water/v1/watersurface waterJRC Global Surface Water recurrence, Sentinel-1 VV
emem_forest/v1/forestforest cover and lossHansen Global Forest Change, ESA WorldCover 2021
emem_weather/v1/weathercurrent weathermet.no nowcast
emem_elevation/v1/elevationelevationCopernicus DEM 30 m, GMRT over ocean
emem_terrain/v1/terrainslope, ruggedness, position3×3 Copernicus DEM neighbourhood
emem_spi/v1/spimeteorological droughtMcKee 1993 SPI
emem_burn_severity/v1/burn_severityburn severitydNBR, Key and Benson classes
emem_deforestation_alert/v1/deforestation_alertforest-loss alertNDVI drop and embedding change
emem_sar_forest_disturbance/v1/sar_forest_disturbancedisturbance under cloudSentinel-1 VV drop of 3 dB or more
emem_rice_ch4/v1/rice_ch4rice-paddy methaneIPCC 2019 Tier 2, Eq 5.1

04Primitives

The read surface is built from a few primitives. Each returns a signed receipt over content-addressed facts, so another peer can reproduce the answer.

PrimitiveWhat it does
recallfacts at a cell for one or more bands; fetches and signs on a miss
askplace resolution, recall and the matching algorithms in one call
find_similark-NN over foundation embeddings
trajectoryone band at one cell across a time window, from stored facts
compare / compare_bandscosine over shared vector bands plus per-band deltas
diffsigned delta of one band between two tslots
query_regionfacts over a region; a bbox is sampled, and only stored cells return
field_boundariesfield polygons from Fields of The World (CC-BY-4.0)
verify / verify_receiptrebuild the preimage and check the Ed25519 signature
entitymint or return one object identity (emem:entity:)
entity/resolvematch a phrasing to registered objects, ranked by independent corroboration
entity/aliasrecord that two phrasings mean the same object
deriveregister a value you computed over parent facts, signed with your key; parents must resolve here and share the cell
derivedlist one attester's derivations; the attester key is required

When a cell has no value for a band, the answer is a signed absence with a typed reason, citable like any fact.

Embeddings

Analytics over sets of 128-D GeoTessera vectors, computed on CPU. When too few cells carry a vector, each returns a signed inconclusive with the observed count. The two render endpoints return images and are REST only.

MCP toolRESTWhat it does
REST only/v1/tessera_fieldthe 128-D Tessera vector per cell over an area
REST only/v1/region_archetype_mapclusters an area into archetypes in embedding space and returns the map
emem_embedding_centroid/v1/embedding_centroidmean vector over a region, L2-normalised, with a centroid_cid
emem_region_similarity/v1/region_similaritycosine between two regions' centroids, in [-1, 1]
emem_embedding_diversity/v1/embedding_diversitymean pairwise cosine distance across a region
emem_neighborhood_consistency/v1/neighborhood_consistencymean cosine to the 8 neighbours; 1 minus that is an outlier score

Memory graph

Reads over the edges between facts and the notes agents write.

MCP toolRESTWhat it does
emem_edges_recall/v1/edges/recalltyped edges into or out of a fact, bi-temporally filtered
emem_memory_search/v1/memory/searchsemantic search over agent notes (BGE-base, 768-D)
emem_memory_contradictions/v1/memory_contradictions(cell, band, tslot) triples where signed values from different attesters disagree
REST only/v1/explainmodel-written prose over a read, labelled signed:false; cite the fact_cids beside it

05Hunter: find events in a region

/v1/hunt takes an event and a region. It samples up to 32 cells, recalls the event's primary band at each, and returns the top 8 with cell64, value, fact_cid and a scene.png URL.

algal_bloomchlorophyll proxy from NDCI with an NDWI water gate (algal_bloom_chlorophyll_ndci@1)
deforestationNDVI drop against the recent baseline (deforestation_alert_ndvi_drop@1)
flood_extentSentinel-1 SAR VV threshold (flood_extent_sar_threshold@1)
wildfiredNBR burn intensity (wildfire_burn_intensity_dnbr_finetune@1)
urban_heat_islandMODIS LST against canopy cover (urban_heat_island_lst_canopy@1)
methane_plumeSWIR anomaly over baseline (methane_plume_swir_anomaly@1)
landslidepost-event Sentinel-1 ΔVV with slope (landslide_post_event_sar_dnn@1)
droughtSPI meteorological drought index (spi_meteorological_drought@1)
soil_salinitysoil salinity index from optical bands (soil_salinity_index@1)
crop_stresscrop stress score from NDVI and NDRE (crop_stress_score@1)
water_turbiditySentinel-2 red-band reflectance, water-mask gated (water_turbidity_red_band@1)
oil_slickno algorithm yet; returns not_yet_implemented with a SAR-darkening workaround

Free-text questions such as “where is deforestation happening in the Amazon” reach the same path through /v1/ask. Ranking uses the primary band only; the full formula is at /v1/algorithms/<key>.

06Physics solvers and forecasting

Three solvers run on signed inputs. Each returns its result with the fact_cids its initial condition was built from.

MethodPathMCP toolModel
POST/v1/heat_solveemem_heat_solveheat equation on a 3×3 stencil of MODIS 8-day LST, N hours ahead, CFL-stable timestep
POST/v1/wave_solveemem_wave_solve1-D shallow-water wave equation, c² = g·h, along a GMRT bathymetry profile; refuses a land-locked profile
POST/v1/jepa_predictemem_jepa_predictnext-month NDVI from up to 24 past months; closed-form AR(2) with fixed α=0.6, β=0.3, γ=0.1

07Transparency log

Every write is appended to a Merkle log. A client that pins a head can later prove the log only grew.

PathWhat it does
GET /v1/log/sthsigned tree head: (tree_size, root); pin it
GET /v1/log/inclusionaudit path from one entry to the head, by leaf index or entry hash
GET /v1/log/consistencyproof that a later tree extends a head you pinned
POST /v1/log/witnesssubmit a co-signature over a head; refused unless the root matches this log's history
GET /v1/log/witnessesco-signatures on record, with the count of independent operators

The tree uses RFC 6962's construction with BLAKE3-256 in place of SHA-256, so Certificate Transparency tooling will not read it.

What it does not prove

08The machine contract

This page lists the calls agents use most. The complete contract is /openapi.json, with every documented path under /v1/*.

Nine verbs

The read surface implements the algebra in the memory model. Each verb is an existing endpoint.

VerbSurface
ensure(a, B)POST /v1/recall: reuse what exists, fetch what is missing
valid(M, a)POST /v1/temporal_route: per-band validity, cite_now or fetch_for_intent
diffPOST /v1/diff · /v1/state_diff
mergePOST /v1/memory_bundle: one signed envelope, one citable name
verifyPOST /v1/verify_receipt · /verify in the browser · offline from the receipt bytes
tracein the fact body: derivation.fn_key and sources[]; formulas at /v1/algorithms
competingPOST /v1/memory_contradictions: disagreement kept as scored evidence
cite / resolvePOST /v1/memory_token · /v1/memory_token/resolve
evolvePOST /v1/attest · supersedes edges; nothing is erased

Browse the contract in the API reference (ReDoc). Agent discovery starts at /v1/agent_card, /agent.json or /.well-known/mcp.json.