Add Prompt
POST /prompts
Store a user prompt.
Request Body
string
required
Session ID this prompt belongs to
string
required
The full prompt text (max 2000 chars, automatically truncated)
string
Project name for filtering
Response
integer
The prompt ID (auto-incremented)
string
Always “saved”
Example
Get Recent Prompts
GET /prompts/recent
Retrieve recent prompts, optionally filtered by project.
Query Parameters
string
Filter by project name
integer
default:"20"
Maximum prompts to return (1-100)
Response
Returns an array of prompts:integer
Prompt ID
string
Session ID
string
Full prompt text
string
Project name (empty string if not set)
string
ISO 8601 timestamp
Example
Search Prompts
GET /prompts/search
Search prompts using full-text search (FTS5).
Query Parameters
string
required
Search query. Supports multiple words, automatically quoted for safety.
string
Filter by project name
integer
default:"10"
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