Prompt Lab

Design, version, test, and iterate on prompt templates. The Prompt Lab page provides a workspace for prompt engineering with version tracking and run recording.

Features

  • Template CRUD — create, edit, and save prompt templates with tags
  • Version tracking — auto-incremented version numbers on each save
  • Test runs — record prompt runs with model, input, output, and score
  • Run history — browse past runs filtered by template
  • A/B testing — compare prompt variants side by side with output analysis

API Endpoints

MethodPathDescription
GET/api/prompts?templateId=List templates and runs
POST/api/promptsCreate template or record a run

Web UI

Two-panel layout: left panel has template list with name/version/tags; right panel has template editor with save/test buttons and recent run history. Navigate from sidebar.

Workflow

  1. Create a new prompt template with a name and optional tags
  2. Write the prompt content using standard markdown
  3. Save — version auto-increments
  4. Run a test: select a model, provide input, and view the output
  5. Iterate on the prompt based on test results
  6. Version history provides full rollback capability

Integration

Prompt templates can be:

  • Used as agent soul prompts via ~/.cortex/SOUL.md
  • Referenced in pipeline hooks
  • Exported and shared across instances
  • Registered via plugins as preset templates

See Also