Skip to content

Graphorin API reference v0.4.0


Graphorin API reference / @graphorin/server / / MemoryApi

Interface: MemoryApi

Defined in: packages/server/src/routes/memory.ts:58

Stable

Methods

deleteBlock()

ts
deleteBlock(scope, label): Promise<boolean>;

Defined in: packages/server/src/routes/memory.ts:63

Parameters

ParameterType
scope{ userId: string; }
scope.userIdstring
labelstring

Returns

Promise&lt;boolean&gt;


forget()

ts
forget(scope, factId): Promise<boolean>;

Defined in: packages/server/src/routes/memory.ts:61

Parameters

ParameterType
scope{ userId: string; }
scope.userIdstring
factIdstring

Returns

Promise&lt;boolean&gt;


remember()

ts
remember(input): Promise<{
  factId: string;
}>;

Defined in: packages/server/src/routes/memory.ts:60

Parameters

ParameterType
input{ metadata?: Record&lt;string, unknown&gt;; scope: { agentId?: string; sessionId?: string; userId: string; }; sensitivity?: "public" | "internal" | "secret"; text: string; }
input.metadata?Record&lt;string, unknown&gt;
input.scope{ agentId?: string; sessionId?: string; userId: string; }
input.scope.agentId?string
input.scope.sessionId?string
input.scope.userIdstring
input.sensitivity?"public" | "internal" | "secret"
input.textstring

Returns

Promise<{ factId: string; }>


ts
search(input): Promise<readonly unknown[]>;

Defined in: packages/server/src/routes/memory.ts:59

Parameters

ParameterType
input{ query: string; scope: { agentId?: string; sessionId?: string; userId: string; }; topK?: number; }
input.querystring
input.scope{ agentId?: string; sessionId?: string; userId: string; }
input.scope.agentId?string
input.scope.sessionId?string
input.scope.userIdstring
input.topK?number

Returns

Promise&lt;readonly unknown[]&gt;


upsertBlock()

ts
upsertBlock(input): Promise<{
  label: string;
}>;

Defined in: packages/server/src/routes/memory.ts:62

Parameters

ParameterType
input{ body: string; label: string; scope: { agentId?: string; sessionId?: string; userId: string; }; }
input.bodystring
input.labelstring
input.scope{ agentId?: string; sessionId?: string; userId: string; }
input.scope.agentId?string
input.scope.sessionId?string
input.scope.userIdstring

Returns

Promise<{ label: string; }>