The Python and JavaScript SDKs handle request construction and response parsing automatically. These endpoint details are for developers building their own client or calling the API directly.
All endpoints require authentication via X-API-Key header (or Authorization: Bearer <token>) and collection-level access.
Import a SnapshotEnvelope into an ephemeral server-side collection. Useful for debugging or running server-side operations against a client-owned snapshot.
Returns a PatchEnvelope with full-value put/delete operations:
Field
Type
Description
collection_id
string
The collection this patch applies to
previous_root_hash
string
Hash of the pre-state snapshot
next_root_hash
string
Expected hash after applying the patch
put_entities
EntityRecord[]
Entities to upsert
delete_entities
string[]
Entity IDs to remove
put_relationships
RelationshipRecord[]
Relationships to upsert
delete_relationships
string[]
Relationship IDs to remove
events
Event[]
Events that were processed
Copy
patch = client.compute({ "collection_id": "YOUR_COLLECTION_ID", "context": snapshot, "events": [ {"content": "Had a meeting with Alice about the Q2 roadmap"}, {"content": "Bob mentioned the API deadline is March 20th"}, ],})
Verify the patch by checking that your post-patch root hash matches next_root_hash. If it doesn’t, re-export the snapshot to resync.
Search your memory through Nebula’s traversal engine. Your snapshot is scored and results are returned. Nothing is persisted server-side.
Copy
POST /v1/device-memory/query
Field
Type
Required
Description
snapshot
SnapshotEnvelope
Yes
Your full snapshot
query
string
Yes
Natural language search query
query_embedding
float[]
No
Pre-computed query embedding. If omitted, Nebula generates it.
limit
integer
No
Maximum entities to return (default: 10)
Returns { "entities": [...], "relationships": [...] } with scored results.
Copy
results = client.query_snapshot( snapshot=snapshot, query="What do I know about Alice?", limit=10,)for entity in results.get("entities", []): print(f"{entity['name']}: {entity['description']}")