Check Lore Consistency Stream
POST /api/agents/lorekeeper/check-consistency/stream
Stream lore consistency check via NDJSON for progressive UI updates.
Request Body required
Section titled “Request Body required ”Comprehensive lore consistency check request.
Validates lore consistency across documents with full context support. Accepts document content with optional IDs, paths, and metadata for maximum flexibility and comprehensive analysis.
Fields: documents: List of DocumentContent objects to check (REQUIRED, min 1) project_type: Project type for lore rules (OPTIONAL, default: “worldbuilding”) check_depth: Analysis depth level (OPTIONAL, default: “moderate”) include_suggestions: Include fix suggestions (OPTIONAL, default: True) compare_against_canon: Compare against specific canon (OPTIONAL) cross_reference: Check consistency across all docs (OPTIONAL, default: True)
JSON Example: { “documents”: [ { “content”: “Arasai fought alongside Erebos…”, “document_id”: “doc_123”, “title”: “Chapter 1” } ], “project_type”: “worldbuilding”, “check_depth”: “deep”, “include_suggestions”: true, “cross_reference”: true }
Used By: - POST /api/agents/lorekeeper/check-consistency - Lore consistency validation UI - Document validation workflows
object
Documents to check with full context
Complete document context for lore consistency checking.
Provides rich document context including content, identifiers, and metadata. Supports flexible usage: content-only for ad-hoc analysis OR complete context with IDs, paths, and metadata for tracked documents.
Fields: content: Document content to analyze (REQUIRED) document_id: Source document ID from database (OPTIONAL) path: File path or document location (OPTIONAL) title: Document title for reporting (OPTIONAL) document_type: Type of document (OPTIONAL) project: Project/world the document belongs to (OPTIONAL)
JSON Example: { “content”: “Arasai wielded the Sword of Fate…”, “document_id”: “doc_123”, “path”: “documents/chapter_01.md”, “title”: “Chapter 1: The Beginning”, “document_type”: “story”, “project”: “my_project” }
Used By: - LoreKeeper consistency checking - Document analysis workflows - Cross-reference validation
Project type for lore rules (worldbuilding, custom, generic)
Analysis depth: minor, moderate, strict, deep. Legacy name kept for back-compat — new clients should send strictness on the unified off | low | medium | high scale instead. When both are sent, strictness wins.
Include fix suggestions for inconsistencies
Check consistency across all provided documents
M8: which scope to run the DE Lorekeeper handler against. document (default) matches the pre-M8 behavior; the other kinds let callers trigger broader scans without splitting the request.
Responses
Section titled “ Responses ”Successful Response
Validation Error