The Prompts API tracks user prompts (questions/requests sent to AI) for context and searchability.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Gentleman-Programming/engram/llms.txt
Use this file to discover all available pages before exploring further.
Add Prompt
POST /prompts
Store a user prompt.
Request Body
Session ID this prompt belongs to
The full prompt text (max 2000 chars, automatically truncated)
Project name for filtering
Response
The prompt ID (auto-incremented)
Always “saved”
Example
Get Recent Prompts
GET /prompts/recent
Retrieve recent prompts, optionally filtered by project.
Query Parameters
Filter by project name
Maximum prompts to return (1-100)
Response
Returns an array of prompts:Prompt ID
Session ID
Full prompt text
Project name (empty string if not set)
ISO 8601 timestamp
Example
Search Prompts
GET /prompts/search
Search prompts using full-text search (FTS5).
Query Parameters
Search query. Supports multiple words, automatically quoted for safety.
Filter by project name
Maximum results to return (1-100)
Response
Returns an array of matching prompts (same schema as Get Recent Prompts).Example
Search Behavior
Query Sanitization
Prompt search uses the same FTS5 sanitization as observations search:Searched Fields
content- Full prompt textproject- Project name
Multi-Word Queries
Multi-word queries match prompts containing all terms (AND logic):Privacy
Prompts support<private>...</private> tags to prevent sensitive data storage:
Error Handling
Missing Required Fields
Missing Search Query
Prompt Schema
Complete prompt object structure:Use Cases
- Context Building - Show recent prompts to provide conversation context
- Pattern Detection - Identify frequently asked questions
- Debugging - Trace what users asked before encountering issues
- Analytics - Understand common user workflows and pain points