SDK — PHP[ v2.x ]

[ 00 ]overview

Modern PHP 8+ SDK with typed properties, enums, and Laravel-friendly service provider.

API Reference

[ 01 ]Install

terminal — install

$ composer require myndlabs/sdk

[ 02 ]Quick start

quickstart.php
use Myndlabs\Client;

$client = new Client(apiKey: $_ENV['MYND_API_KEY']);

$agent = $client->agents()->create([
    'name' => 'my-agent',
    'model' => 'auto',
    'instructions' => 'You are a helpful assistant.',
]);

$run = $client->agents()->run($agent->id, [
    'input' => 'Explain quantum computing in one sentence.',
]);

echo $run->output;

[ 03 ]Features

PHP 8+

Named arguments, enums, readonly properties, and union types throughout.

Laravel integration

Service provider, facade, and queue job dispatch out of the box.

PSR-compliant

PSR-7 HTTP messages, PSR-18 client, and PSR-3 logging.

Everything else — auth, streaming, errors, pagination — lives in the documentation.

Full docs