Overview
Prompt components enable you to:- Reuse prompts across multiple agents and ensembles
- Version prompts with semantic versioning for reproducibility
- A/B test different prompt versions
- Organize complex multi-step instructions
- Deploy prompts independently from code
Quick Start
1. Create a Prompt Component
Create a prompt file (plain text or Markdown):2. Add to Edgit
3. Reference in Your Ensemble
URI Format and Versioning
All prompt components use the standardized URI format:prompt://- Protocol identifier for prompt components{path}- Logical path to the prompt (e.g.,analyze-company,workflows/extraction/step1)[@{version}]- Optional version identifier (defaults to@latest)
@latest- Always uses the most recent version@v1- Uses latest patch of major version (v1.x.x)@v1.0.0- Specific semantic version (immutable)@prod- Custom tag for production versions@staging- Custom tag for staging versions
Example URIs
How to Reference in Ensembles
There are three ways to reference prompts in your ensembles:1. URI Format (Recommended)
Use theprompt:// URI format to reference versioned prompt components:
2. Template Expression Format
Use${components.prompt_name@version} to embed prompt references in prompts:
3. Inline Prompt
For simple operations or during development, use inline prompts directly:Using Prompt Components
Multi-Step Workflow
Caching and Performance
Prompt components are automatically cached for 1 hour (3600 seconds) after first load.Default Caching
Custom Cache TTL
Bypass Cache
Best Practices
1. Version Your Prompts
Use semantic versioning to track changes:2. Use Production Tags
Create stable version tags for production ensembles:3. Test Before Promoting
4. Clear, Specific Instructions
5. Include Examples
6. Organize by Purpose
Use path hierarchies for organization:Provider-Specific Considerations
Anthropic (Claude)
Optimized for detailed instructions and reasoning:OpenAI (GPT)
Works well with concise instructions:Cloudflare Workers AI
Use simpler, shorter prompts:Common Patterns
Sentiment Analysis
Information Extraction
Content Summarization
Versioning Strategy
Development Workflow
Rollback Strategy
Troubleshooting
Prompt Not Found
Error:Component not found: prompt://analyze-company@v1.0.0
Solution:
- Check prompt exists:
edgit list prompts - Check version:
edgit versions analyze-company - Verify deployment:
edgit status analyze-company@v1.0.0
Inconsistent Results
Issue: Same prompt produces different outputs Solutions:- Set
temperature: 0for deterministic results - Use specific model versions:
claude-sonnet-4-20250514 - Include more specific examples in the prompt
Cache Issues
Issue: Updated prompt not being used Solution: Invalidate cache or setcache.bypass: true

