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

# Installation

> How to install and configure the toolbox package

## Requirements

* PHP 8.3 or higher

* Laravel 11.0 or higher

## Installation Steps

1. Install the package via Composer:

```bash theme={null}
composer require jordan-price/toolbox
```

1. Publish the configuration file:

```bash theme={null}
php artisan vendor:publish --tag="toolbox-config"
```

## Configuration

After installation, you can configure the package in your `.env` file:

```env theme={null}
# Weather Tool (optional)
WEATHER_API_KEY=your_api_key
```

## Usage with Prism

All tools in this package are designed to work with Echolabs [Prism](https://prism.echolabs.dev/getting-started/introduction.html)\`. Here's a basic example:

```php theme={null}
use EchoLabs\Prism\Prism;
use EchoLabs\Prism\Enums\Provider;
use EchoLabs\Prism\Enums\ToolChoice;
use JordanPrice\Toolbox\Tools\Weather\WeatherTool;

$weatherTool = new WeatherTool();

$prism = Prism::text()
    ->using(Provider::Anthropic, 'claude-3-5-sonnet-latest')
    ->withPrompt('What is the weather in London?')
    ->withTools([$weatherTool])  // Pass the tool instance
    ->toolChoice(ToolChoice::Any);

$response = $prism->generate();
```

For more detailed examples, see the individual tool documentation.
