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

# Advanced Installation

> Complete installation guide for PandaAGI SDK

## System Requirements

Before installing PandaAGI SDK, ensure your system meets the following requirements:

<AccordionGroup>
  <Accordion title="Python Version">
    * Python 3.9 or higher
    * Python 3.11+ recommended for best performance
  </Accordion>

  <Accordion title="Operating System">
    * Linux (Ubuntu 18.04+, CentOS 7+)
    * macOS 10.15+
    * Windows 10+ (with WSL2 recommended)
  </Accordion>

  <Accordion title="Dependencies">
    * Docker (for environment isolation)
  </Accordion>
</AccordionGroup>

## Installation Methods

<CodeGroup>
  ```bash pip (Recommended) theme={null}
  # The easiest way to install PandaAGI SDK
  pip install panda-agi

  # For the latest development version
  pip install git+https://github.com/panda-agi/sdk.git
  ```

  ```bash uv theme={null}
  # For faster installation using uv (a fast Python package installer)
  uv pip install panda-agi

  # Or install uv first if you don't have it
  curl -LsSf https://astral.sh/uv/install.sh | sh

  # Then install panda-agi
  uv pip install panda-agi

  # For the latest development version with uv
  uv pip install git+https://github.com/panda-agi/sdk.git
  ```

  ```bash Poetry theme={null}
  # If you're using Poetry for dependency management
  poetry add panda-agi
  ```

  ```bash Conda theme={null}
  # For Conda users
  conda install -c conda-forge panda-agi
  ```
</CodeGroup>

### From Source

For development or the latest features:

<Steps>
  <Step title="Clone the Repository">
    ```bash theme={null}
    git clone https://github.com/panda-agi/sdk.git
    cd panda-agi-sdk
    ```
  </Step>

  <Step title="Install Dependencies">
    ```bash theme={null}
    pip install -e .
    ```

    Or with Poetry:

    ```bash theme={null}
    poetry install
    ```
  </Step>

  <Step title="Verify Installation">
    ```bash theme={null}
    python -c "import panda_agi; print(panda_agi.__version__)"
    ```
  </Step>
</Steps>

## API Key Configuration

To use PandaAGI SDK, you need an API key that you can obtain from the PandaAGI platform:

<Steps>
  <Step title="Get Your API Key">
    1. Visit [https://agi.pandas-ai.com/](https://agi.pandas-ai.com/)
    2. Sign in with your GitHub account
    3. Navigate to your dashboard to access your API keys
    4. Copy your `PANDA_AGI_KEY`
  </Step>

  <Step title="Set Environment Variable">
    Configure your API key as an environment variable:

    <Tabs>
      <Tab title=".env File (Recommended)">
        Create a `.env` file in your project root:

        ```bash theme={null}
        # .env file
        PANDA_AGI_KEY=your-api-key-here
        ```
      </Tab>

      <Tab title="Linux/macOS">
        Set in your shell profile for persistence:

        ```bash theme={null}
        # Add to ~/.bashrc or ~/.zshrc
        PANDA_AGI_KEY="your-api-key-here"
        ```

        Then reload your profile:

        ```bash theme={null}
        source ~/.bashrc  # or source ~/.zshrc if using zsh
        ```
      </Tab>

      <Tab title="Windows">
        ```powershell theme={null}
        # Set permanently via System Environment Variables
        # Open System Properties > Advanced > Environment Variables
        # Or via PowerShell:
        [Environment]::SetEnvironmentVariable("PANDA_AGI_KEY", "your-api-key-here", "User")
        ```
      </Tab>
    </Tabs>
  </Step>

  <Step title="Verify Configuration">
    Test that your API key is properly configured:

    ```python theme={null}
    import os

    api_key = os.getenv('PANDA_AGI_KEY')
    if api_key:
        print("✅ API key configured successfully")
    else:
        print("❌ API key not found")
    ```
  </Step>

  <Step title="Set in Python Code (Alternative)">
    You can also set the API key directly in your Python code:

    ```python theme={null}
    import os

    # Set the API key in your environment variables
    os.environ['PANDA_AGI_KEY'] = 'your-api-key-here'

    # Now you can import and use PandaAGI
    from panda_agi import Agent
    ```

    <Note>
      Setting the API key this way only persists for the current Python process.
      For production applications, consider using environment variables, a `.env` file with python-dotenv,
      or a secure configuration manager like AWS Secrets Manager or HashiCorp Vault.
    </Note>
  </Step>
</Steps>

## Environment Variables

Configure your environment with the required API keys:

<Tabs>
  <Tab title=".env File (Recommended)">
    Create a `.env` file in your project root:

    ```bash theme={null}
    # Required: PandaAGI API Key (get from https://agi.pandas-ai.com/)
    PANDA_AGI_KEY=your-panda-agi-api-key

    # Optional: Tavily API Key for enhanced web search functionality
    TAVILY_API_KEY=your-tavily-api-key
    ```
  </Tab>

  <Tab title="OS Environment Variables">
    <Tabs>
      <Tab title="Linux/macOS">
        Add to your shell profile (\~/.bashrc, \~/.zshrc):

        ```bash theme={null}
        # Required: PandaAGI API Key
        PANDA_AGI_KEY="your-panda-agi-api-key"

        # Optional: Tavily API Key
        TAVILY_API_KEY="your-tavily-api-key"
        ```
      </Tab>

      <Tab title="Windows">
        Set via System Environment Variables or PowerShell:

        ```powershell theme={null}
        # Set environment variables permanently
        [Environment]::SetEnvironmentVariable("PANDA_AGI_KEY", "your-panda-agi-api-key", "User")
        [Environment]::SetEnvironmentVariable("TAVILY_API_KEY", "your-tavily-api-key", "User")
        ```
      </Tab>
    </Tabs>
  </Tab>
</Tabs>

<Note>
  **Important**: Keep your API keys secure and never commit them to version control.
  For production use, consider secure key management systems like AWS Secrets Manager,
  HashiCorp Vault, or environment-specific configuration services.
</Note>

## Docker Setup

For isolated general AI agent [environments](/concepts/environments), install Docker:

<Tabs>
  <Tab title="Ubuntu/Debian">
    ```bash theme={null}
    # Update package index
    sudo apt-get update

    # Install Docker
    sudo apt-get install docker.io

    # Start Docker service
    sudo systemctl start docker
    sudo systemctl enable docker

    # Add user to docker group
    sudo usermod -aG docker $USER
    ```
  </Tab>

  <Tab title="macOS">
    ```bash theme={null}
    # Install Docker Desktop
    brew install --cask docker

    # Or download from https://docker.com/products/docker-desktop
    ```
  </Tab>

  <Tab title="Windows">
    ```powershell theme={null}
    # Install Docker Desktop for Windows
    # Download from https://docker.com/products/docker-desktop

    # Or using Chocolatey
    choco install docker-desktop
    ```
  </Tab>
</Tabs>

## Next Steps

Now that you have PandaAGI SDK installed, check out:

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Build your first general AI agent in minutes
  </Card>

  <Card title="Architecture" icon="lightbulb" href="/concepts/architecture">
    Understand the fundamental concepts
  </Card>
</CardGroup>
