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
| Method | Path | Description |
|---|---|---|
GET | /api/prompts?templateId= | List templates and runs |
POST | /api/prompts | Create 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
- Create a new prompt template with a name and optional tags
- Write the prompt content using standard markdown
- Save — version auto-increments
- Run a test: select a model, provide input, and view the output
- Iterate on the prompt based on test results
- 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
- Built-in Agents — Pre-configured agent soul prompts
- Pipeline System — Prompt injection hooks
- Skills System — Procedural knowledge capture