# Step by Step

#### Step-by-Step Guide

**1. Setup Environment Variables**

The Maccaw agent needs an API key and base URL to communicate with OpenAI's LLMs. Create a `.env` file in your project directory and add the following keys:

```bash
BASE_URL=https://api.openai.com/v1/engines [Optional]
API_KEY=your_openai_api_key
MODEL_NAME=gpt-3.5-turbo
```

> Replace `your_openai_api_key` with your actual OpenAI API key.

**Install Required Libraries**

Run the following commands to install the necessary libraries:

```bash
pip install maccaw pydantic winshell pywin32 python-dotenv
```

* `maccaw`: Allows integration with LLM-based agents.
* `pydantic`: For data validation.
* `winshell` and `pywin32`: For working with the Windows recycle bin.

#### Step 3: Import Required Libraries

Next, we'll import the required libraries. The `winshell` module allows us to interact with the recycle bin, and we’ll use `pydantic` to define the structure of the tool's inputs.

```python
import os
import winshell
from pydantic import BaseModel, Field
from typing import Optional, Type
from maccaw.maccaw import BaseTool
from win32com.client import Dispatch
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://ds-organization-11.gitbook.io/maccaw/tutorial/ai-recycle-bin-assistant/step-by-step.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
