Skip to main content

PromptExpanderAgent

Defined in the Prompt Expander Agent module.
AI Agent Agent for expanding short prompts into detailed, comprehensive prompts. This agent transforms brief task descriptions into rich, detailed prompts that provide better context and guidance for task execution. Key difference from QueryRewriterAgent:
  • QueryRewriterAgent: Optimizes queries for search/retrieval (RAG)
  • PromptExpanderAgent: Expands prompts for detailed task execution
Attributes: name: Name of the agent model: LLM model to use for expansion (alias for llm=) temperature: Temperature for LLM generation (higher = more creative) tools: Optional tools for context gathering

Constructor

str
default:"'PromptExpanderAgent'"
No description available.
str
default:"'gpt-4o-mini'"
No description available.
Optional[str]
No description available.
bool
default:"False"
No description available.
float
default:"0.7"
No description available.
int
default:"1000"
No description available.
Optional
No description available.

Methods

agent()

Lazy initialization of internal Agent.

expand()

Expand a prompt using the specified strategy.

expand_basic()

Convenience method for basic expansion.

expand_detailed()

Convenience method for detailed expansion.

expand_structured()

Convenience method for structured expansion.

expand_creative()

Convenience method for creative expansion.

Usage

Source

View on GitHub

praisonaiagents/agent/prompt_expander_agent.py at line 62

Agents Concept

Single Agent Guide

Multi-Agent Guide

Agent Configuration

Auto Agents