> ## 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.

# Installation

> Install the PraisonAI Rust SDK in your project

Get started with PraisonAI in Rust in under a minute.

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    subgraph "Setup"
        I[📦 Install] --> C[⚙️ Configure]
        C --> R[🚀 Run]
    end
    
    classDef step fill:#6366F1,stroke:#7C90A0,color:#fff
    class I,C,R step
```

## Quick Start

<Steps>
  <Step title="Add to Cargo.toml">
    ```toml theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    [dependencies]
    praisonai = "0.1"
    tokio = { version = "1", features = ["full"] }
    ```
  </Step>

  <Step title="Set API Key">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    export OPENAI_API_KEY="your-key"
    ```
  </Step>

  <Step title="Create Your First Agent">
    ```rust theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    use praisonai::Agent;

    #[tokio::main]
    async fn main() -> Result<(), Box<dyn std::error::Error>> {
        let agent = Agent::new()
            .name("Assistant")
            .instructions("You are a helpful assistant")
            .build()?;
        
        let response = agent.chat("Hello!").await?;
        println!("{}", response);
        
        Ok(())
    }
    ```
  </Step>

  <Step title="Run">
    ```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
    cargo run
    ```
  </Step>
</Steps>

***

## Requirements

| Requirement | Version |
| ----------- | ------- |
| Rust        | 1.70+   |
| Tokio       | 1.x     |

***

## Optional Features

Enable additional capabilities in Cargo.toml:

```toml theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
[dependencies]
praisonai = { version = "0.1", features = ["mcp", "knowledge"] }
```

| Feature     | Description                    |
| ----------- | ------------------------------ |
| `mcp`       | Model Context Protocol support |
| `knowledge` | RAG and knowledge base         |
| `full`      | All features enabled           |

***

## Best Practices

<AccordionGroup>
  <Accordion title="Use environment variables for API keys">
    Never hardcode API keys in your code. Use environment variables.
  </Accordion>

  <Accordion title="Start with minimal features">
    Add features incrementally as needed for smaller binary size.
  </Accordion>
</AccordionGroup>

***

## Related

<CardGroup cols={2}>
  <Card title="Quick Start" icon="rocket" href="/docs/rust/quickstart">
    First agent tutorial
  </Card>

  <Card title="Agent" icon="robot" href="/docs/rust/agent">
    Agent configuration
  </Card>
</CardGroup>
