Graph integration
Neo4j or Memgraph is an optional projection service. Cortex's Convex runtime owns authorization, ordered outbox events, leases, retries, stage readiness and source retirement. A trusted Node worker executes fixed scoped connector work.
Setup
- Configure an owned Neo4j/Memgraph service with private credentials.
- Register a scoped connector and current service principal/grant through trusted administration.
- Start
CortexGraphWorkerwithConvexGraphWorkerTransportandCypherProjectionConnectorfrom@cortexmemory/sdk/runtime/graph. - Select graph in the published Agent's required stages only when that projection consistency is needed.
The graph service API includes a complete typed worker example. Browser apps keep only runtime status and need no graph credentials.
Ordered projection
Source/fact changes create retained outbox work. Current authority, source revision/hash/profile and lease are checked before effects. The connector's transaction enforces scope epochs/revisions and tombstones, so an already issued old worker cannot overwrite newer/deleted state.
Stopped workers do not discard work. Graph failures/unknown outcomes are visible; backend retry and reconciliation own the lifecycle. Dependency retirement follows derived/transitive references. A later event does not skip an earlier watermark hole.
CLI graph setup manages an owned service independently of SDK/application updates. Local stop preserves volumes; existing-service mode probes without data writes and refuses local lifecycle operations. See CLI reference.