Skip to content

remember

The remember operation stores a new memory in HEBBS. The memory is written to the WAL, indexed for similarity and temporal search, and becomes immediately queryable. Embedding generation and index updates may complete asynchronously (ack-first semantics).

ProtocolService/MethodEndpoint
gRPCMemoryService.Remember
RESTPOST/v1/memories
FieldTypeRequiredDefaultDescription
contentstringYesThe primary payload: text or structured data. This is what gets embedded for similarity search.
importancefloatNo0.5Salience score (0.0–1.0). Higher values are prioritized during recall and decay more slowly.
contextmapNoArbitrary key-value metadata (e.g., source, channel, session_id). Used for filtering.
entity_idstringNoScope boundary. All recall is scoped by entity unless explicitly cross-entity.
edgesarrayNo[]Typed relationships to other memories: CausedBy, RelatedTo, FollowedBy, etc.
tenant_idstringNoDerived from API key or "default"Tenant scope for data isolation. Normally derived from the API key by the server. Override only when running without authentication or for cross-tenant administrative operations.

Note: For REST, tenant_id is derived from the Authorization header — not passed in the request body. For gRPC, it can be set explicitly in the request message but is overridden by the API key’s tenant when auth is enabled.

Returns the created Memory object with id, content, importance, context, entity_id, edges, created_at, updated_at, and kind (Episode).

Terminal window
curl -s -X POST http://localhost:6381/v1/memories \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $HEBBS_API_KEY" \
-d '{
"content": "User prefers dark mode and keyboard shortcuts.",
"importance": 0.8,
"context": {"source": "settings", "session_id": "sess_abc123"},
"entity_id": "user_42"
}' | jq .
Terminal window
grpcurl -plaintext \
-H "authorization: Bearer $HEBBS_API_KEY" \
-d '{
"content": "User prefers dark mode and keyboard shortcuts.",
"importance": 0.8,
"context": {"source": "settings"},
"entity_id": "user_42"
}' localhost:6380 hebbs.MemoryService/Remember