praisonai "write a movie script in 3 lines" --expand-prompt
Expected Output:
โจ Expanding prompt...โญโ Original Prompt โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎโ write a movie script in 3 lines โโฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏโญโ Expanded Prompt โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎโ Write a compelling 3-line movie script that includes: โโ 1. A hook that establishes the setting and protagonist โโ 2. A conflict or turning point that creates tension โโ 3. A resolution or cliffhanger that leaves an impact โโ โโ Format: Each line should be a complete scene description with dialogue โโ if appropriate. Use present tense and vivid imagery. โโฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
# Tools filepraisonai "latest AI trends" --expand-prompt --expand-tools tools.py# Built-in SDK toolpraisonai "draft a coding plan" --expand-prompt --expand-tools "internet_search"# praisonai-tools / entry-point pluginpraisonai "draft a coding plan" --expand-prompt --expand-tools "duckduckgo_search"
--expand-tools now accepts any name reachable by praisonai tools list โ the same resolver chain used by praisonai research --tools and --rewrite-tools. See Tool Resolution for the full chain.
Expanded to: โWrite a comprehensive blog post about Artificial Intelligence that includes: an engaging introduction, key concepts explained for beginners, current trends and applications, future predictions, and a conclusion with actionable takeaways. Use headers, bullet points, and examples.โ
Expanded to: โCreate a REST API with the following specifications: endpoints for CRUD operations, proper HTTP methods (GET, POST, PUT, DELETE), error handling with appropriate status codes, input validation, authentication middleware, and documentation comments.โ
Expanded to: โResearch quantum computing covering: fundamental principles (qubits, superposition, entanglement), current hardware implementations, major players and their approaches, practical applications, challenges and limitations, and future outlook.โ
The CLIโs --expand-prompt step honours the standard cascade โ CLI flag wins, env vars next, gpt-4o-mini fallback last:
# Expander uses claude-3-5-sonnet-latest, matching the main agentpraisonai "write a movie script in 3 lines" --expand-prompt --llm claude-3-5-sonnet-latest
To keep a cheap expander regardless of the main model, pin it explicitly with OPENAI_MODEL_NAME=gpt-4o-mini while --llm drives the main agent โ but the recommended pattern is running the expander and main agent on the same model.
The model= kwarg on PromptExpanderAgent is unchanged โ the cascade above applies only to the CLI path.
from praisonaiagents import PromptExpanderAgent, ExpandStrategy# Basic usageagent = PromptExpanderAgent()result = agent.expand("write a movie script in 3 lines")print(result.expanded_prompt)# With specific strategyresult = agent.expand("blog about AI", strategy=ExpandStrategy.DETAILED)# Available strategies: BASIC, DETAILED, STRUCTURED, CREATIVE, AUTO