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

# Installation

> Get started with Ziet in under a minute

## Install the SDK

Install Ziet using pip:

```bash theme={null}
pip install ziet
```

<Tip>
  **Recommended**: Use a virtual environment to isolate dependencies.

  ```bash theme={null}
  python -m venv venv
  source venv/bin/activate  # On Windows: venv\Scripts\activate
  pip install ziet
  ```
</Tip>

## Install the CLI

The Ziet CLI is included with the SDK. Verify installation:

```bash theme={null}
ziet --version
```

Expected output:

```
ziet version 0.1.0
```

## Authentication

### Get Your API Key

1. Sign up at [dashboard.ziet.ai](https://dashboard.ziet.ai)
2. Navigate to [**Developer** → **API Keys**](https://dashboard.ziet.ai/developer)
3. Click **Create API Key**
4. Copy your key (starts with `ziet_`)

### Set Your API Key

<CodeGroup>
  ```bash Environment Variable (Recommended) theme={null}
  export ZIET_API_KEY="ziet_your_api_key_here"
  ```

  ```bash .env File theme={null}
  # .env
  ZIET_API_KEY=ziet_your_api_key_here
  ```

  ```python Python Code theme={null}
  import os
  os.environ["ZIET_API_KEY"] = "ziet_your_api_key_here"
  ```
</CodeGroup>

<Warning>
  **Never commit your API key to version control.** Add `.env` to your `.gitignore`.
</Warning>

## Verify Installation

Create a test file `hello.py`:

```python theme={null}
from ziet import Action

@Action(description="Say hello")
def hello(name: str) -> str:
    return f"Hello, {name}!"

if __name__ == "__main__":
    result = hello("World")
    print(result)
```

Run it:

```bash theme={null}
python hello.py
```

Expected output:

```
[INFO] Action hello started
Hello, World!
[INFO] Action hello completed in 0.00s
```

## Initialize a Project

Create a new Ziet project:

```bash theme={null}
ziet init my-agent-project
cd my-agent-project
```

This creates a boilerplate structure:

```
my-agent-project/
├── agent.py          # Main agent definition
├── actions.py        # Action functions
├── requirements.txt  # Python dependencies
├── .env             # Environment variables (git-ignored)
├── .gitignore
└── ziet.yaml        # Project configuration
```

## Project Configuration

Edit `ziet.yaml` to configure your project:

```yaml theme={null}
name: my-agent-project
runtime: python3.11
environment: production

# Environment variables (synced from dashboard)
env:
  - OPENAI_API_KEY
  - STRIPE_API_KEY

# Deployment settings
deploy:
  region: us-east-1
  timeout: 300
  memory: 512
```

## System Requirements

<Accordion title="Python Version">
  **Required**: Python 3.9 or higher

  Check your version:

  ```bash theme={null}
  python --version
  ```

  Ziet is tested on Python 3.9, 3.10, 3.11, and 3.12.
</Accordion>

<Accordion title="Dependencies">
  Ziet has minimal dependencies and installs everything needed:

  * No external databases required
  * No Redis, Celery, or message queues
  * No Docker (unless you want to use it)

  The SDK is lightweight (\~5MB) and installs in seconds.
</Accordion>

<Accordion title="Operating Systems">
  Ziet works on:

  * **macOS**: 10.15 (Catalina) or later
  * **Linux**: Ubuntu 20.04+, Debian 10+, CentOS 8+
  * **Windows**: Windows 10/11 (via WSL2 recommended)
</Accordion>

## Troubleshooting

<AccordionGroup>
  <Accordion title="ImportError: No module named 'ziet'">
    **Solution**: Ensure you're using the correct Python environment.

    ```bash theme={null}
    which python  # Check which Python is active
    pip list | grep ziet  # Verify ziet is installed
    ```

    If needed, reinstall:

    ```bash theme={null}
    pip uninstall ziet
    pip install ziet
    ```
  </Accordion>

  <Accordion title="Authentication Error: Invalid API Key">
    **Solution**: Verify your API key is set correctly.

    ```bash theme={null}
    echo $ZIET_API_KEY  # Should print your key
    ```

    If empty, set it:

    ```bash theme={null}
    export ZIET_API_KEY="ziet_your_key_here"
    ```
  </Accordion>

  <Accordion title="ziet: command not found">
    **Solution**: The CLI wasn't added to PATH.

    ```bash theme={null}
    # Find where pip installed ziet
    pip show ziet

    # Add to PATH (add to ~/.bashrc or ~/.zshrc)
    export PATH="$PATH:$(python -m site --user-base)/bin"
    ```
  </Accordion>
</AccordionGroup>

## Next Steps

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

  <Card title="Actions" icon="bolt" href="/core/actions">
    Learn about serverless actions
  </Card>

  <Card title="Agents" icon="robot" href="/core/agents">
    Build intelligent agents
  </Card>
</CardGroup>
