Skip to Content
DocsPrompt LibraryTechnical Details

Technical Details

Data Model

The Prompt Library is built on a high-performance Firestore backend, optimized for real-time collaboration.

Schema

  • Folders: Lightweight containers that reference a parent_id. This allows for efficient moving and reorganizing of subtrees without deep recursion.
  • Prompts: Store content, metadata (variables, model config), and order for display.

API Structure

All interaction happens via the REST API at /api/v1/organizations/{orgId}/:

  • GET /prompts: List all prompts.
  • GET /folders: List all folders.
  • PATCH /prompts/{id}/move: Atomic move operation.
  • POST /prompts/batch-order: Batch update for drag-and-drop reordering.

Editor Integration

Prompt Injection

The Library supports advanced integration with the Monaco Editor. You can drag a prompt from the sidebar directly into code or another prompt.

  • Drag Format: text/plain
  • Syntax: [[ Folder/Subfolder/PromptName ]]

This syntax is recognized by the LLMX Compiler to inject the referenced prompt’s content at runtime, enabling modular prompt composition.

Last updated on