Skip to main content
Reasoning mode shows the agent’s thought process.

Quick Start

1

Create Reasoning Agent

use praisonai::Agent;

// Build step-by-step reasoning into instructions
let agent = Agent::new()
    .name("Thinker")
    .instructions("When solving problems:
    1. Break down the problem into smaller parts
    2. Think through each part step by step
    3. Show your reasoning before the final answer
    4. Provide a clear conclusion")
    .build()?;

let response = agent.chat("What causes rain?").await?;
// Agent shows step-by-step reasoning in response
2

Use Reasoning-Optimized Models

use praisonai::Agent;

// Use models designed for reasoning
let agent = Agent::new()
    .name("Analyst")
    .model("o1-preview")  // OpenAI reasoning model
    .instructions("Analyze this complex problem thoroughly")
    .build()?;

When to Use

TaskUse Reasoning?
Math problemsβœ… Yes
Complex analysisβœ… Yes
Simple questions❌ No
Quick lookups❌ No