Skip to main content

memory_provider.go (package eai)

Source: sdks/go/memory_provider.go. Back to the Go SDK reference index.

note

This page is generated by tools/docs/gen_sdk_reference.py from the SDK sources and the OpenAPI text folders. Do not edit it by hand: change the source and regenerate.

Class DocumentUpload​

Body of UploadDocument; Content is sent base64 encoded as content_base64.

Fields:

NameTypeRequiredDescription
MimeType (mime_type)stringyesMedia type of the content, for example application/pdf or image/png.
Title (title)stringnoTitle of the document.
Filename (filename)stringnoOriginal file name; its extension must match the real format.
URI (uri)stringnoSource URI; the URI of an existing document makes this upload its next version.
Classification (classification)stringnoClassification of the document, never above the one of the knowledge base.
Readers (readers)[]stringnoReaders of the document (default: the readers of the knowledge base).
Metadata (metadata)map[string]anynoFree key-value pairs stored with the object and returned as they are; the platform never interprets them.
Collection (collection)stringnoCollection of the document, usable as a query filter.
Language (language)stringnoLanguage of the document (2 to 10 characters, for example fr).

DocumentUpload.MarshalJSON​

MarshalJSON() ([]byte, error)

MarshalJSON adds content_base64, the bytes of Content.

This element takes no parameter.

Returns: ([]byte, error). JSON body of the upload.

Raises: error.

Class RagAgentService​

RagAgentService groups the endpoints of: Navin Enterprise RAG Agent instances, activation and lifecycle owned by the Control Plane.

RagAgentService.Backup​

Backup(ctx context.Context, instanceID string, opts ...CallOption) (json.RawMessage, error)

Back up an instance (not supported). Answers 501 rag_agent_backup_not_supported with parts and the reason of each one: the RAG runtime has no admin route to export the rag schema rows of an instance, the knowledge domain has no export of a knowledge base. Nothing is pretended; the refusal is audited.

Route: /v1/rag-agent/instances/{instance_id}/backup (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
instanceIDstringyesIdentifier (UUID) of the instance.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Back up an instance (not supported)". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

RagAgentService.Check​

Check(ctx context.Context, instanceID string, opts ...CallOption) (json.RawMessage, error)

Validate an instance. Real checks before provisioning: the project exists and the caller may administer it, the generation model exists in the registry with the chat capability and a usable status, the embedding model resolves in the Model Gateway (capability embeddings), the quota of instances, Qdrant answers, the shared runtime answers (shared model) or the Navin Manager answers (dedicated model, an unpublished catalog service is a warning). From draft or after a failed validation. 200 with validation and status draft; 422 rag_agent_validation_failed with the failed checks (status failed, step validation). Audited as rag_agent.validate and rag_agent.validate.completed.

Route: /v1/rag-agent/instances/{instance_id}/validate (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
instanceIDstringyesIdentifier (UUID) of the instance.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Validate an instance". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

RagAgentService.Create​

Create(ctx context.Context, body any, opts ...CallOption) (json.RawMessage, error)

Create a draft RAG Agent instance. Creates the activation record in draft (201) with its immutable id (given, for example the id chosen by the RAG runtime, or generated). Needs a tenant administrator or an owner of the project (403 forbidden); unknown project: 404 rag_agent_project_not_found; a name or an id already used: 409 conflict. With Idempotency-Key a retry replays the first answer. Audited as rag_agent.create.

Route: /v1/rag-agent/instances (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
bodyanyyesName, project, organization and business unit, deployment model, generation and embedding models of the registry, optional version.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Create a draft RAG Agent instance". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

RagAgentService.Delete​

Delete(ctx context.Context, instanceID string, opts ...CallOption) (json.RawMessage, error)

Delete an instance. Long operation (202, status deleting then deleted) from draft, stopped or failed (a ready instance is stopped first, else 409). Removes only what the instance owns, as recorded in resources: its knowledge base and its Qdrant points, the objects under its storage prefix, its agent memories and memory policy, its tuples, API key and secret, its agent; the governed application is retired. The shared runtime, a shared database, the Qdrant collection shared by the tenant knowledge bases and the storage profile are kept. Each step lists deleted and kept. Audited as rag_agent.delete and rag_agent.delete.completed.

Route: /v1/rag-agent/instances/{instance_id} (DELETE).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
instanceIDstringyesIdentifier (UUID) of the instance.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Delete an instance". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

DeleteLogo(ctx context.Context, instanceID string, opts ...CallOption) (json.RawMessage, error)

Remove the logo of an instance. Back to the default logo of the runtime: the branding no longer points to an object, version is incremented and the stored object is removed. Without a logo, answers the branding unchanged. Same rights as the PUT; audited as rag_agent.branding.logo.remove.

Route: /v1/rag-agent/instances/{instance_id}/branding/logo (DELETE).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
instanceIDstringyesIdentifier (UUID) of the instance.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Remove the logo of an instance". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

RagAgentService.Get​

Get(ctx context.Context, instanceID string, opts ...CallOption) (json.RawMessage, error)

Read a RAG Agent instance. The activation record with serving (true for ready and degraded), the current operation and run, validation, last_error and the steps of the current run in order (state, attempts, detail, logs, times). This is the route the RAG runtime reads at startup and on demand.

Route: /v1/rag-agent/instances/{instance_id} (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
instanceIDstringyesIdentifier (UUID) of the instance, the same in the Control Plane and in the RAG runtime.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read a RAG Agent instance". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

RagAgentService.GetBranding​

GetBranding(ctx context.Context, instanceID string, opts ...CallOption) (json.RawMessage, error)

Read the branding of an instance. The branding chosen in the activation journey, owned by the Control Plane: agent_name, sidebar_color, navbar_color, the text colours computed for them (sidebar_text_color, navbar_text_color, black or white, contrast 4.5:1 or more), logo (content_type, sha256, size_bytes, url) or null, version, updated_at, and app_url (the URL of the web application once known). A null field means the default of the runtime. The RAG runtime keeps a replica of it for its public login page and rewrites it when version is newer. Any principal of the tenant; another tenant's instance answers 404.

Route: /v1/rag-agent/instances/{instance_id}/branding (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
instanceIDstringyesIdentifier (UUID) of the instance.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read the branding of an instance". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

GetLogo(ctx context.Context, instanceID string, opts ...CallOption) ([]byte, error)

Read the logo of an instance. The logo bytes, read from the storage domain and checked against the recorded sha256, with the Content-Type of the validated format (image/png or image/jpeg), X-Content-Type-Options: nosniff, a Content-Security-Policy starting with default-src 'none' and an ETag. 404 rag_agent_logo_not_found when the instance has no logo. Any principal of the tenant.

Route: /v1/rag-agent/instances/{instance_id}/branding/logo (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
instanceIDstringyesIdentifier (UUID) of the instance.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: ([]byte, error). Decoded JSON answer of the operation "Read the logo of an instance". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

RagAgentService.Health​

Health(ctx context.Context, instanceID string, opts ...CallOption) (json.RawMessage, error)

Health of an instance. Real checks: readiness URL of the runtime (GET /readyz), knowledge base (row, vector store qdrant, Qdrant /readyz) and model gateway (generation and embedding models in the registry, usable). status is up, degraded or down (runtime down); instance_status is the lifecycle status. Each check has status, duration_ms and reason when not up.

Route: /v1/rag-agent/instances/{instance_id}/health (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
instanceIDstringyesIdentifier (UUID) of the instance.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Health of an instance". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

RagAgentService.List​

List(ctx context.Context, opts ...CallOption) (json.RawMessage, error)

List the RAG Agent instances. Activation records of the tenant, newest first, with status, deployment model, versions and owned resources (one page, next_cursor null). Filters: status, project.

Route: /v1/rag-agent/instances (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "List the RAG Agent instances". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

RagAgentService.Provision​

Provision(ctx context.Context, instanceID string, opts ...CallOption) (json.RawMessage, error)

Provision an instance. Long operation (202, Operation-Id): status provisioning then starting, steps from validation to activation run by the worker. From a validated draft (else 409 rag_agent_not_validated) or after a failed provisioning, which resumes from the failed step. Repeated while provisioning or once ready: changed: false. Audited as rag_agent.provision, each step as rag_agent.step.

Route: /v1/rag-agent/instances/{instance_id}/provision (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
instanceIDstringyesIdentifier (UUID) of the instance.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Provision an instance". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

RagAgentService.Restart​

Restart(ctx context.Context, instanceID string, opts ...CallOption) (json.RawMessage, error)

Restart an instance. Long operation (202): from ready, degraded, stopped or after a failed restart, steps deployment (Navin Manager restart for a dedicated instance), health, smoke, activation. A restart in progress: changed: false.

Route: /v1/rag-agent/instances/{instance_id}/restart (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
instanceIDstringyesIdentifier (UUID) of the instance.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Restart an instance". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

RagAgentService.Restore​

Restore(ctx context.Context, instanceID string, backupID string, opts ...CallOption) (json.RawMessage, error)

Restore an instance (not supported). Answers 501 rag_agent_backup_not_supported with the same parts as the backup: no backup of an instance can be made for real yet. Audited.

Route: /v1/rag-agent/instances/{instance_id}/restore (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
instanceIDstringyesIdentifier (UUID) of the instance.
backupIDstringyesIdentifier of the backup to restore.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Restore an instance (not supported)". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

RagAgentService.Start​

Start(ctx context.Context, instanceID string, opts ...CallOption) (json.RawMessage, error)

Start an instance. Long operation (202): from stopped (or after a failed start or stop), steps deployment (Navin Manager start for a dedicated instance, status only for a shared one), health, smoke, activation (governed application active). Already starting or ready: changed: false.

Route: /v1/rag-agent/instances/{instance_id}/start (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
instanceIDstringyesIdentifier (UUID) of the instance.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Start an instance". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

RagAgentService.Stop​

Stop(ctx context.Context, instanceID string, opts ...CallOption) (json.RawMessage, error)

Stop an instance. Long operation (202): from ready, degraded or after a failed start, restart, upgrade or stop, steps deployment (Navin Manager stop for a dedicated instance, status only for a shared one) and activation (governed application suspended, reason rag_instance_stopped); status stopped. Already stopping or stopped: changed: false.

Route: /v1/rag-agent/instances/{instance_id}/stop (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
instanceIDstringyesIdentifier (UUID) of the instance.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Stop an instance". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

RagAgentService.UpdateBranding​

UpdateBranding(ctx context.Context, instanceID string, body any, opts ...CallOption) (json.RawMessage, error)

Change the branding of an instance. Writes the fields given (an absent field is kept, null brings it back to the default of the runtime) and answers the branding. Colours are #RRGGBB (stored in upper case); the text drawn on them is black or white, whichever contrasts most (WCAG 2.2 relative luminance, the rule of the RAG frontend), and a colour whose text would stay under 4.5:1 answers 422 rag_agent_branding_contrast. app_url must be an https URL without credentials (422 rag_agent_app_url_invalid). A change of the name, the colours or the logo increments version; expected_version different from the current one answers 409 rag_agent_branding_version_conflict. With an Idempotency-Key, a retry with the same body replays the first answer (Idempotency-Replayed: true), another body answers 409 idempotency_conflict. Needs a tenant administrator or an owner of the project (403 forbidden); refused while the instance is deleting or deleted (409). Audited as rag_agent.branding.update.

Route: /v1/rag-agent/instances/{instance_id}/branding (PUT).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
instanceIDstringyesIdentifier (UUID) of the instance.
bodyanyyesThe branding fields to write.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Change the branding of an instance". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

RagAgentService.Upgrade​

Upgrade(ctx context.Context, instanceID string, version string, opts ...CallOption) (json.RawMessage, error)

Upgrade an instance. Long operation (202), status updating: a shared instance follows the shared runtime, so the deployment step checks that the runtime runs the requested version (else shared_runtime_version_mismatch); a dedicated one is reinstalled by the Navin Manager. Then health, smoke, activation; deployed_version becomes the version. The same version already deployed or in progress: changed: false.

Route: /v1/rag-agent/instances/{instance_id}/upgrade (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
instanceIDstringyesIdentifier (UUID) of the instance.
versionstringyesVersion to deploy (letters, digits, ., _, +, -, up to 64 characters).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Upgrade an instance". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

UploadLogo(ctx context.Context, instanceID string, logo LogoUpload, opts ...CallOption) (json.RawMessage, error)

Upload the logo of an instance. Multipart file (with the optional text fields filename and mime_type). PNG or JPEG only: SVG and any other format are refused. The real signature, the declared Content-Type and the file extension must match; 32 to 1024 pixels a side, 512 KiB at most; else 422 rag_agent_logo_invalid with details.reason (format_not_allowed, signature_invalid, signature_mismatch, extension_mismatch, dimensions_out_of_bounds, too_large, empty). The file is then scanned by the file security domain, fail closed: a blocked file answers 422 file_blocked, a scanner down 503 file_scan_unavailable. It is stored through the storage domain in the documents storage profile of the tenant under rag-agent/<tenant>/<instance>/branding/ (409 rag_agent_branding_storage_required without such a profile, 503 rag_agent_branding_storage_unavailable when it cannot be reached); the replaced object is removed. Increments version and answers the branding. Same rights as the PUT; audited as rag_agent.branding.logo.update (a refusal is audited as a denial).

Route: /v1/rag-agent/instances/{instance_id}/branding/logo (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
instanceIDstringyesIdentifier (UUID) of the instance.
logoLogoUploadyesLogo to upload: bytes, file name and MIME type (image/png or image/jpeg).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Upload the logo of an instance". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

Model LogoUpload​

Logo of RagAgent.UploadLogo: PNG or JPEG bytes sent as the multipart part file, with its file name and MIME type.

Fields:

NameTypeRequiredDescription
Content[]byteyesBytes of the PNG or JPEG image (32 to 1024 pixels, 512 KiB at most).
FilenamestringyesName of the logo file; its extension must match the real format.
MimeTypestringyesMedia type of the content, for example application/pdf or image/png.

Class MemoryService​

Memory. Memory Manager: long lived memory items of agents and users, following the Memory Contract v1, with ACL, lifetime, legal hold, versioning and hybrid search.

MemoryService.AddKnowledge​

AddKnowledge(ctx context.Context, agentID string, body any, opts ...CallOption) (json.RawMessage, error)

Ingest knowledge. Adds texts to the Cognee dataset of one scope (Cognee POST /api/v1/add, then POST /api/v1/cognify when build_graph), only when the policy enables knowledge_graph and the engine is cognee or hybrid (else 403 or 422 memory_capability_unsupported). Same DLP, classification, retention and isolation checks as a memory; relation editor on the agent. 201 with dataset, items and graph. Accepts an Idempotency-Key header. Audited as memory.knowledge.create without the content.

Route: /v1/memory/agents/{agent_id}/knowledge (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
agentIDstringyesName or identifier of the agent.
bodyanyyesTexts to ingest and their scope.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Ingest knowledge". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.AgentPolicy​

AgentPolicy(ctx context.Context, agentID string, opts ...CallOption) (json.RawMessage, error)

Read the memory policy of an agent. Engine choice (builtin, mem0, cognee, hybrid), instances, modes, scopes, memorization limits, retention, sharing and required isolation of the agent, with version, configured (false: defaults, builtin engine) and engines (per purpose memory or knowledge: instance, provider, isolation and capabilities). Relation viewer on the agent, or the agent itself.

Route: /v1/memory/agents/{agent_id}/policy (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
agentIDstringyesName or identifier of the agent.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read the memory policy of an agent". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.AgentPolicyVersions​

AgentPolicyVersions(ctx context.Context, agentID string, opts ...CallOption) (json.RawMessage, error)

List the versions of the memory policy. Former versions of the memory policy of the agent, newest first (at most 200), each with its engine, instances, policy, author and date. Relation viewer on the agent.

Route: /v1/memory/agents/{agent_id}/policy/versions (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
agentIDstringyesName or identifier of the agent.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "List the versions of the memory policy". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.BuildGraph​

BuildGraph(ctx context.Context, agentID string, body any, opts ...CallOption) (json.RawMessage, error)

Build the knowledge graph. Runs Cognee POST /api/v1/cognify on readable datasets of the instance of the agent (all of them by default). Relation editor on the agent. Audited as memory.knowledge.build.

Route: /v1/memory/agents/{agent_id}/knowledge/graph (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
agentIDstringyesName or identifier of the agent.
bodyanyyesDatasets to process.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Build the knowledge graph". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.Datasets​

Datasets(ctx context.Context, agentID string, opts ...CallOption) (*Page, error)

List the knowledge datasets. Datasets the caller may read through this agent, paginated with cursor.

Route: /v1/memory/agents/{agent_id}/knowledge/datasets (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
agentIDstringyesName or identifier of the agent.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.DeclareEngine​

DeclareEngine(ctx context.Context, body any, opts ...CallOption) (json.RawMessage, error)

Declare a memory engine instance. Declares an instance of Mem0 or Cognee installed and operated by the Navin Manager, for example one dedicated to a tenant (tenant_id: physical separation, as a bank requires). Only platform_admin (403 otherwise). The credential is a reference only (openbao://<path> or env://EAI_CRED_<NAME>), resolved server side. 409 conflict when the id exists or is reserved (builtin, mem0, cognee), 404 for an unknown tenant. Accepts an Idempotency-Key header. Audited as memory.engine.declare.

Route: /v1/memory/engines (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
bodyanyyesThe engine instance to declare.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Declare a memory engine instance". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.DeleteDataset​

DeleteDataset(ctx context.Context, agentID string, datasetID string, opts ...CallOption) (json.RawMessage, error)

Delete a knowledge dataset. Deletes the dataset in Cognee (DELETE /api/v1/datasets/{dataset_id}) and its index entries. 409 legal_hold when the dataset or one of its items is held. Audited as memory.knowledge.delete.

Route: /v1/memory/agents/{agent_id}/knowledge/datasets/{dataset_id} (DELETE).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
agentIDstringyesName or identifier of the agent.
datasetIDstringyesIdentifier (UUID) of the Navin index entry of the dataset.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Delete a knowledge dataset". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.DeleteEngine​

DeleteEngine(ctx context.Context, engineID string, opts ...CallOption) (json.RawMessage, error)

Remove a declared memory engine instance. Removes a declared instance and the tenant credentials bound to it. Only platform_admin. 409 memory_engine_in_use while an agent policy or a memory still uses it; 404 memory_engine_not_found. Audited as memory.engine.delete.

Route: /v1/memory/engines/{engine_id} (DELETE).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
engineIDstringyesIdentifier of the engine instance.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Remove a declared memory engine instance". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.DeleteEngineCredential​

DeleteEngineCredential(ctx context.Context, engineID string, opts ...CallOption) (json.RawMessage, error)

Unbind the credential of the tenant. Removes the credential of this tenant on the instance; the credential of the instance is used again. Role tenant_admin. Audited as memory.engine.change.

Route: /v1/memory/engines/{engine_id}/credential (DELETE).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
engineIDstringyesIdentifier of the engine instance.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Unbind the credential of the tenant". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.EngineCapabilities​

EngineCapabilities(ctx context.Context, engineID string, opts ...CallOption) (json.RawMessage, error)

Read the capabilities of a memory engine. Declarative capability set of the engine: only what its provider really executes. memory: among remember, recall, search, update, forget, list, get, purge, get_health, get_capabilities; knowledge: among ingest_knowledge, build_graph, search_graph, get_relations, delete_dataset. An operation outside this set answers 422 memory_capability_unsupported. Also gives isolation for the tenant and session_memory (true for builtin only: session memory never goes to an external engine). Nothing is sent to the engine.

Route: /v1/memory/engines/{engine_id}/capabilities (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
engineIDstringyesIdentifier of the engine instance (builtin, mem0, cognee or a declared id).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read the capabilities of a memory engine". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.EngineHealth​

EngineHealth(ctx context.Context, engineID string, opts ...CallOption) (json.RawMessage, error)

Check the health of a memory engine. Calls the engine with the credential of the tenant: Mem0 GET /auth/setup-status then GET /configure/providers, Cognee GET /health then GET /api/v1/datasets. Answers status up (or degraded), or down with error and reason (never a secret). Roles tenant_admin, developer, security_officer or auditor.

Route: /v1/memory/engines/{engine_id}/health (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
engineIDstringyesIdentifier of the engine instance.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Check the health of a memory engine". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.Engines​

Engines(ctx context.Context, opts ...CallOption) (json.RawMessage, error)

List the memory engines. Memory engines the tenant may use (Navin Memory Provider): builtin (the Memory Manager store), the platform instances mem0 and cognee rendered by the Navin Manager from its bindings (only when configured), and the instances declared by the platform administrator (shared ones and those dedicated to this tenant; a dedicated instance of another tenant is never listed). Each entry gives provider, base_url, origin (builtin, manager_binding, declared), dedicated, credential_bound (the credential itself is never returned), isolation (logical, backend or dedicated_instance: the separation this instance guarantees for the tenant) and capabilities. Navin Enterprise never installs nor configures an engine: the Navin Manager does.

Route: /v1/memory/engines (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "List the memory engines". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.Export​

Export(ctx context.Context, agentID string, body any, opts ...CallOption) (json.RawMessage, error)

Export the memories of an agent. Exports at most 1000 readable memories with their content (untrusted data). Refused to agents (403). Audited as memory.export without the content.

Route: /v1/memory/agents/{agent_id}/memories/export (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
agentIDstringyesName or identifier of the agent.
bodyanyyesScopes to export (default: every readable scope).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Export the memories of an agent". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.Forget​

Forget(ctx context.Context, agentID string, itemID string, opts ...CallOption) (json.RawMessage, error)

Forget a memory of an agent. Deletes the memory in its engine (Mem0 DELETE /memories/{memory_id}, Cognee data item deletion, builtin soft delete) and marks the index entry deleted. 409 legal_hold; only the owner agent of a shared memory (403). Audited as memory.provider.delete.

Route: /v1/memory/agents/{agent_id}/memories/{item_id} (DELETE).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
agentIDstringyesName or identifier of the agent.
itemIDstringyesIdentifier (UUID) of the Navin index entry.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Forget a memory of an agent". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.Memories​

Memories(ctx context.Context, agentID string, opts ...CallOption) (*Page, error)

List the memories of an agent. Index entries of the memories the caller may read through this agent (readable scopes of the policy, classification within the clearance, not expired), paginated with cursor. With include_content=true (at most 100 per page) the content is read from the engine and returned as untrusted data. Audited as memory.provider.read.

Route: /v1/memory/agents/{agent_id}/memories (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
agentIDstringyesName or identifier of the agent.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (*Page, error). A Page: Page is one page of a cursor paginated collection {"items": [...], "next_cursor": "..."|null}. The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.MemoryItem​

MemoryItem(ctx context.Context, agentID string, itemID string, opts ...CallOption) (json.RawMessage, error)

Get a memory of an agent. Index entry and content (read from the engine, untrusted data) of one memory. An item of a scope the caller may not read answers 404, never 403, so its existence is not disclosed. Audited as memory.provider.read.

Route: /v1/memory/agents/{agent_id}/memories/{item_id} (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
agentIDstringyesName or identifier of the agent.
itemIDstringyesIdentifier (UUID) of the Navin index entry.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Get a memory of an agent". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.Purge​

Purge(ctx context.Context, agentID string, body any, opts ...CallOption) (json.RawMessage, error)

Purge one scope of an agent. Deletes every memory and dataset of one scope of the caller (Mem0 DELETE /memories with the identifiers of the scope, Cognee dataset deletion, builtin soft delete). confirm must be true (400). 409 legal_hold when an item of the scope is held. Audited as memory.provider.purge.

Route: /v1/memory/agents/{agent_id}/memories/purge (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
agentIDstringyesName or identifier of the agent.
bodyanyyesThe scope to purge and the confirmation.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Purge one scope of an agent". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.Recall​

Recall(ctx context.Context, agentID string, body any, opts ...CallOption) (json.RawMessage, error)

Recall memories for the LLM. Searches the readable scopes on the engines of the policy (hybrid: Mem0 and Cognee, merged and deduplicated by content, every source kept in sources), keeps only the results indexed by Navin for a readable scope and within the clearance (permission check before anything reaches the LLM), screens them for prompt injection (blocked items dropped) and returns them as untrusted data: framed_content wrapped in the untrusted markers and context_segments of type memory for the Context Manager, never instructions. The policy decision memory.search is evaluated. Audited as memory.provider.read with counts only.

Route: /v1/memory/agents/{agent_id}/recall (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
agentIDstringyesName or identifier of the agent.
bodyanyyesQuery, scopes, number of results and session.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Recall memories for the LLM". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.Relations​

Relations(ctx context.Context, agentID string, datasetID string, opts ...CallOption) (json.RawMessage, error)

Read the relations of a dataset. Nodes and edges of the knowledge graph of one readable dataset (Cognee GET /api/v1/datasets/{dataset_id}/graph), screened for prompt injection and returned as untrusted data. 404 for a dataset the caller may not read. Audited as memory.provider.read.

Route: /v1/memory/agents/{agent_id}/knowledge/datasets/{dataset_id}/relations (GET).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
agentIDstringyesName or identifier of the agent.
datasetIDstringyesIdentifier (UUID) of the Navin index entry of the dataset.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Read the relations of a dataset". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.Remember​

Remember(ctx context.Context, agentID string, body any, opts ...CallOption) (json.RawMessage, error)

Remember through the engine of the agent. Writes one memory through the engine of the agent policy (session scope: always the builtin store; hybrid: Mem0). 201 with items (index entries, without content), engine and engine_instance. The context (tenant, organization, project, user, agent, session) is derived server side from the authenticated principal, the agent registry and the verified session, never from the body. Checks, each refusal audited: an agent only uses its own memory (403 memory_agent_mismatch), the scope and the kind must be allowed by the policy (403), shared scopes need editor on the agent, the engine must announce remember (422 memory_capability_unsupported) and guarantee the required isolation (409), secrets, passwords, tokens and keys are refused (422 memory_secret_refused), personal data when the policy forbids it (422), a classification above the policy or the clearance (403), a retention above the policy (422). Accepts an Idempotency-Key header. Audited as memory.provider.create without the content.

Route: /v1/memory/agents/{agent_id}/memories (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
agentIDstringyesName or identifier of the agent.
bodyanyyesThe memory to remember.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Remember through the engine of the agent". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.RestoreAgentPolicy​

RestoreAgentPolicy(ctx context.Context, agentID string, version int, opts ...CallOption) (json.RawMessage, error)

Restore a version of the memory policy. Applies a former version again as a new version, with the same checks as PUT .../policy. 404 for an unknown version. Audited as memory.policy.restore.

Route: /v1/memory/agents/{agent_id}/policy/restore (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
agentIDstringyesName or identifier of the agent.
versionintyesVersion number (1 or more).
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Restore a version of the memory policy". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.SearchKnowledge​

SearchKnowledge(ctx context.Context, agentID string, body any, opts ...CallOption) (json.RawMessage, error)

Search the knowledge graph. Cognee POST /api/v1/search, one readable dataset per call so every passage is attributed to its dataset; results are screened and returned as untrusted data with framed_content. The policy decision memory.search is evaluated. Audited as memory.provider.read.

Route: /v1/memory/agents/{agent_id}/knowledge/search (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
agentIDstringyesName or identifier of the agent.
bodyanyyesQuery, datasets, number of results and search type.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Search the knowledge graph". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.SearchMemories​

SearchMemories(ctx context.Context, agentID string, body any, opts ...CallOption) (json.RawMessage, error)

Search the memories of an agent. Same search as recall for a person who consults the memories (no context_segments); shared scopes need editor on the agent. Results are untrusted data. Audited as memory.provider.read.

Route: /v1/memory/agents/{agent_id}/memories/search (POST).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
agentIDstringyesName or identifier of the agent.
bodyanyyesQuery, scopes, number of results and session.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Search the memories of an agent". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.SetAgentPolicy​

SetAgentPolicy(ctx context.Context, agentID string, body any, opts ...CallOption) (json.RawMessage, error)

Set the memory policy of an agent. Replaces the memory policy of the agent (new version, the former one is kept for a restore). Checks: roles tenant_admin, developer or application_owner and relation editor on the agent (403); global_access needs tenant_admin; default_scope must be a write scope and shared_with existing agents (400); the chosen instances must exist, match the provider and guarantee required_isolation (409 memory_isolation_unsatisfied: a dedicated instance installed by the Navin Manager is required). The policy decision memory.policy.update is enforced. shared_with writes or deletes the OpenFGA relation memory_reader of each agent on this one. Audited as memory.policy.update, plus memory.engine.change when the engine or an instance changes and memory.share when the sharing changes.

Route: /v1/memory/agents/{agent_id}/policy (PUT).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
agentIDstringyesName or identifier of the agent.
bodyanyyesEngine choice, instances and memory policy of the agent.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Set the memory policy of an agent". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.SetEngineCredential​

SetEngineCredential(ctx context.Context, engineID string, credentialRef string, opts ...CallOption) (json.RawMessage, error)

Bind the credential of the tenant on an engine. Binds the credential of this tenant on a shared instance (openbao://<path> reference to a secret of the tenant). On a Cognee instance with backend access control, it is the API key of the Cognee user of the tenant: its datasets and permissions are then enforced by Cognee itself (isolation becomes backend). On Mem0 a key does not separate the memories (logical stays). Role tenant_admin. Audited as memory.engine.change.

Route: /v1/memory/engines/{engine_id}/credential (PUT).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
engineIDstringyesIdentifier of the engine instance.
credentialRefstringyesReference openbao://<path> to a secret of the tenant.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Bind the credential of the tenant on an engine". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).

MemoryService.UpdateMemory​

UpdateMemory(ctx context.Context, agentID string, itemID string, content string, opts ...CallOption) (json.RawMessage, error)

Update a memory of an agent. Replaces the content of a memory in its engine (Mem0 PUT /memories/{memory_id}, builtin new version) after the same DLP checks as a creation; the version increases. Only the owner agent of a shared memory may change it (403); a held item answers 409 legal_hold. Audited as memory.provider.update.

Route: /v1/memory/agents/{agent_id}/memories/{item_id} (PATCH).

NameTypeDefaultRequiredDescription
ctxcontext.ContextyesContext of the call: cancellation and deadline.
agentIDstringyesName or identifier of the agent.
itemIDstringyesIdentifier (UUID) of the Navin index entry.
contentstringyesText (1 to 20000 characters); secrets are refused.
opts...CallOptionnoPer call options (query, idempotency key, traceparent, headers).

Returns: (json.RawMessage, error). Decoded JSON answer of the operation "Update a memory of an agent". The error is a typed error of the SDK, nil on success.

Raises: error, the typed errors of the transport (Errors).