A sophisticated multi-agent system that transforms simple instructions into detailed, production-ready prompts. This tool leverages GPT-4 and a pydantic-ai agent architecture to generate structured prompts with XML tags, quality guidelines, and execution steps.
agentic-prompt-rewriter.mp4
- Intelligent Prompt Generation: Transforms simple intentions into comprehensive prompts
- Structured Output: Generates prompts with XML tags for clear input/output handling
- Real-time Streaming: Watch the prompt generation process in real-time
- Multi-step Validation: Ensures quality and completeness of generated prompts
- Flexible Use Cases: Works for content creation, analysis, and more
- User-friendly Interface: Built with Streamlit for easy interaction
- Clone the repository:
git clone https://github.com/yourusername/ai-prompt-generator.git- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows use: venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Run the application:
streamlit run app.py- Python 3.9+
- OpenAI API key
- See requirements.txt for complete package list
The system consists of several key components:
-
Input Processing Agent
- Analyzes user intent
- Determines required prompt structure
- Validates input requirements
-
Prompt Generation Agent
- Creates structured prompts
- Implements XML tagging
- Ensures format consistency
- Enter your OpenAI API key in the sidebar
- Input your prompt intention (e.g., "write an article")
- Optionally add examples
- Click "Generate Prompt"
- Watch as the system generates a structured prompt
- Download the generated prompt as needed
Key configuration options are available through environment variables:
OPENAI_API_KEY=your_api_keyGenerated prompts follow this structure:
You are [role]
[task description]
Required Inputs:
[XML-tagged input structure]
Instructions:
[step-by-step process]
Output Format:
[expected output structure]
Quality Guidelines:
[quality checks]
Restrictions:
[constraints]
Reach me out from linkedin : www.linkedin.com/in/enes-koΕar