Skip to content

MemoryCreate

Create a new Memory

Endpoint: /api/memory/memorycreate

Tags: Memory

API Details

POST /api/memory/memorycreate
schema: z.object({
// tenantId is no longer exposed in the API - it's always derived from the API key
content: Str({ description: "The actual content of the memory" }),
type: z.enum([MemoryType.ShortTerm, MemoryType.LongTerm, MemoryType.Graph, MemoryType.SemanticRAG]),
tags: z.array(Str()).optional(),
source: Str({ description: "Where the memory came from", required: false }),
ttl: z.number().optional().describe("Time to live in seconds (for short-term memory)"),
metadata: z.record(z.any()).optional().describe("Additional metadata for the memory"),
entityIds: z.array(Str()).optional().describe("IDs of entities mentioned in this memory")
}),

Returns the created memory

schema: z.object({
success: Bool(),
memory: Memory,
}),

Bad request

schema: z.object({
success: Bool(),
error: Str(),
}),

Unauthorized

schema: z.object({
success: Bool(),
error: Str(),
}),

View Source