> ## Documentation Index
> Fetch the complete documentation index at: https://praison.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Specialized Agents • Rust AI Agent SDK

> Specialized agents for PraisonAI

# specialized\_agents

<Badge color="orange">Rust AI Agent SDK</Badge>

Specialized agents for PraisonAI

This module provides specialized agent types matching the Python SDK:

* `PromptExpanderAgent`: Expands short prompts into detailed, comprehensive prompts
* `QueryRewriterAgent`: Transforms queries to improve retrieval quality in RAG

# Example

```rust,ignore theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
use praisonai::specialized_agents::{PromptExpanderAgent, ExpandStrategy};

let expander = PromptExpanderAgent::new()
.model("gpt-4o-mini")
.build();

let result = expander.expand("Write a blog post", ExpandStrategy::Detailed, None).await?;
println!("Expanded: {}", result.expanded_prompt);
```

## Import

```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
use praisonai::specialized_agents::*;
```

## Classes

<CardGroup cols={2}>
  <Card title="ExpandResult" icon="brackets-curly" href="../classes/ExpandResult">
    Result of prompt expansion
  </Card>

  <Card title="ExpandPrompts" icon="brackets-curly" href="../classes/ExpandPrompts">
    Prompt expansion prompts for each strategy
  </Card>

  <Card title="PromptExpanderConfig" icon="brackets-curly" href="../classes/PromptExpanderConfig">
    Configuration for PromptExpanderAgent
  </Card>

  <Card title="PromptExpanderAgentBuilder" icon="brackets-curly" href="../classes/PromptExpanderAgentBuilder">
    Builder for PromptExpanderAgent
  </Card>

  <Card title="PromptExpanderAgent" icon="brackets-curly" href="../classes/PromptExpanderAgent">
    Agent for expanding prompts
  </Card>

  <Card title="RewriteResult" icon="brackets-curly" href="../classes/RewriteResult">
    Result of query rewriting
  </Card>

  <Card title="RewritePrompts" icon="brackets-curly" href="../classes/RewritePrompts">
    Query rewriting prompts for each strategy
  </Card>

  <Card title="QueryRewriterConfig" icon="brackets-curly" href="../classes/QueryRewriterConfig">
    Configuration for QueryRewriterAgent
  </Card>

  <Card title="QueryRewriterAgentBuilder" icon="brackets-curly" href="../classes/QueryRewriterAgentBuilder">
    Builder for QueryRewriterAgent
  </Card>

  <Card title="QueryRewriterAgent" icon="brackets-curly" href="../classes/QueryRewriterAgent">
    Agent for rewriting queries
  </Card>

  <Card title="ExpandStrategy" icon="brackets-curly" href="../classes/ExpandStrategy">
    Expansion strategy for prompts
  </Card>

  <Card title="RewriteStrategy" icon="brackets-curly" href="../classes/RewriteStrategy">
    Rewriting strategy for queries
  </Card>
</CardGroup>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust Agent" icon="robot" href="/docs/rust/agent" />

  <Card title="Rust Overview" icon="book-open" href="/docs/rust/overview" />

  <Card title="Rust Quickstart" icon="rocket" href="/docs/rust/quickstart" />

  <Card title="Rust Installation" icon="download" href="/docs/rust/installation" />

  <Card title="Rust Autonomy" icon="wand-magic-sparkles" href="/docs/rust/autonomy" />
</CardGroup>
