Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content
Core

Core Direct Lanes and Policy

Policy contract for direct core query routes and safe rollout guidance.

Direct core routes expose low-level retrieval behavior and are intentionally policy-gated.

Route policy contract

Always allowed:

  • /v2/core/health
  • /v2/core/auth/*

Policy-gated:

  • POST /v2/core/search requires MUBIT_CORE_ENABLE_DIRECT_SEARCH
  • /v2/core/pubsub/subscribe, /v2/core/pubsub/unsubscribe, /v2/core/pubsub/list require MUBIT_CORE_ENABLE_DIRECT_PUBSUB

Other external /v2/core/* routes are denied by default middleware.

Core route reference

These routes are available at /v2/core/*. Routes beyond auth and health require appropriate policy flags or internal access.

Data operations

RouteMethodPurpose
/v2/core/insertPOSTInsert a single node
/v2/core/batch_insertPOSTBatch insert multiple nodes (always allowed)
/v2/core/node/:idGETRetrieve a node by ID
/v2/core/node/:idDELETEDelete a node by ID
/v2/core/runs/:run_idDELETEDelete all nodes in a run
/v2/core/searchPOSTSemantic vector search (policy-gated)

Agent scratchpad memory

Per-session key-value scratchpad for agent working memory.

RouteMethodPurpose
/v2/core/memory/:session_idPOSTWrite to session scratchpad
/v2/core/memory/:session_idGETRead session scratchpad
/v2/core/memory/:session_idDELETEClear session scratchpad

SDM (Sparse Distributed Memory) operations

ℹ️Note
The legacy POST /v2/core/sdm/write and POST /v2/core/sdm/read endpoints have been removed and now return HTTP 410 Gone. SDM writes happen implicitly on /v2/core/insert, and SDM reads happen implicitly on /v2/core/search — there is no separate SDM surface to call.

Session management

Transactional sessions for atomic multi-operation commits.

RouteMethodPurpose
/v2/core/session/createPOSTCreate a new session
/v2/core/session/:id/commitPOSTCommit session changes
/v2/core/session/:id/dropDELETEDrop session without committing
/v2/core/session/:id/snapshotPOSTSnapshot current session state
/v2/core/session/loadPOSTLoad a previously snapshotted session

Storage maintenance

RouteMethodPurpose
/v2/core/storage/statsGETRocksDB storage statistics (size, keys, compaction) (always allowed)
/v2/core/storage/compactPOSTTrigger manual compaction (always allowed)

ACL (Access Control)

RouteMethodPurpose
/v2/core/acl/grantPOSTGrant permission to a user/agent
/v2/core/acl/revokePOSTRevoke a permission
/v2/core/acl/checkPOSTCheck if a permission is granted

PubSub

Data-plane subscriptions fire on Node insert / update / delete and on session memory writes. Filters are all, node (specific node_id), semantic (vector similarity over query_text with a threshold), or session (session scope).

RouteMethodResponsePurpose
/v2/core/pubsub/subscribePOSTtext/event-stream (SSE)Open a server-sent-event stream. First event is subscribed with {subscription_id}; subsequent events are node.inserted, node.updated, node.deleted, or memory.added with flat JSON payloads (see schema below). The subscription lives for the lifetime of the HTTP connection and is cleaned up automatically on disconnect.
/v2/core/pubsub/unsubscribePOSTJSONExplicitly remove a subscription by ID (primarily an admin/debugging surface — normal clients just close the SSE connection).
/v2/core/pubsub/listPOSTJSONList active subscription IDs for the calling user, plus the server-wide total.

gRPC equivalent: CoreService.Subscribe(CoreSubscribeRequest) → stream PubSubEvent on the same data-plane gRPC surface.

Request body for /v2/core/pubsub/subscribe:

FieldTypeRequiredDescription
filter_typestringyes"all", "node", "semantic", or "session".
node_iduint64when filter_type == "node"Node to watch.
query_textstringwhen filter_type == "semantic"Encoded server-side; events fire when an inserted/updated node's vector exceeds similarity threshold.
thresholdfloatnoCosine-similarity floor for semantic filters. Defaults to 0.8.

Event payload schema (each SSE data: line + each gRPC PubSubEvent message decode to the same JSON shape):

typePopulated fields
subscribedsubscription_id
node.inserted / node.updatednode_id, run_id, metadata_json, created_at, updated_at
node.deletednode_id
memory.addedsession_id, entry_json

metadata_json and entry_json are JSON-encoded strings on the wire. The official SDK wrappers parse them into native metadata / entry objects, coerce uint64 / int64 fields to numbers, and drop irrelevant proto defaults before yielding the event. Clients speaking the raw HTTP / gRPC surface need to do the same translation themselves.

Control parity rule

The same policy gates apply when control.query runs in direct bypass mode.

Rollout guidance

  1. Start with both direct lane flags disabled.
  2. Enable one lane at a time outside production.
  3. Monitor lane-specific request/error metrics.
  4. Keep routed mode fallback active.

Failure modes and troubleshooting

SymptomRoot causeFix
Direct lane request deniedRequired flag disabledUse routed retrieval or enable lane explicitly
Increased production error rateLane enabled without guardrailsRoll back lane and re-enable with staged traffic
Unclear fallback behaviorNo route policy decision treeDefine mode fallback rules per feature

Next steps