Skip to main content
Nowledge MemNowledge Mem

Preview Memory Kg Extraction

POST
/memories/{memory_id}/extract-kg/preview

Preview knowledge graph extraction for a memory.

This endpoint extracts entities and relationships from a memory's content using the local LLM, providing a preview without saving to the database.

Path Parameters

memory_id*Memory Id

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Request for knowledge graph extraction from a memory.

Note: memory_id is provided in the URL path, not in the request body.

Response Body

application/json

application/json

curl -X POST "https://example.com/memories/string/extract-kg/preview" \  -H "Content-Type: application/json" \  -d '{}'
{  "memory_id": "string",  "memory_title": "string",  "memory_content": "string",  "entities": [    {}  ],  "relationships": [    {}  ],  "extraction_confidence": 0,  "entities_count": 0,  "relationships_count": 0,  "kg_already_extracted": true,  "can_extract": true,  "write_plan": {}}