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

# Official SDK-compatible layer

> Use the Laravel Copilot SDK with an official SDK-style flow while keeping Laravel-friendly ergonomics.

## Official SDK-style usage

This package supports a pure PHP style that mirrors the official SDK while still giving you a Laravel-friendly developer experience.

<Note>
  This only explains that "under Facade, the official SDK is replicated and can be used in the same way," so it is generally recommended to use Facade.
</Note>

```php theme={null}
use Revolution\Copilot\Client;
use Revolution\Copilot\Session;
use Revolution\Copilot\Types\SessionEvent;

$client = new Client([
    'cli_path' => 'copilot',
    'cli_args' => [],
    'cwd' => base_path(),
    'log_level' => 'info',
    'env' => null,
]);

$client->start();

/** @var Session $session */
$session = $client->createSession([
    'model' => 'gpt-5',
]);

$done = $session->on(function (SessionEvent $event) {
    if($event->isAssistantMessage()) {
        echo $event->content();
    }
});

$session->send(prompt: 'Tell me something about Laravel.');
$session->wait(timeout: 60.0); // Force waiting with wait() until true async support is officially implemented.

$done();

$session->disconnect();
$client->stop();
```

<Info>
  For the latest updates, see the [GitHub repository](https://github.com/invokable/laravel-copilot-sdk).
</Info>


## Related topics

- [Steering and queuing](/en/packages/laravel-copilot-sdk/steering.md)
- [Creating a Custom Provider for AI SDK](/en/advanced/ai-sdk-custom-provider.md)
- [GitHub Copilot SDK for Laravel](/en/packages/laravel-copilot-sdk/index.md)
- [VOICEVOX for Laravel](/en/packages/laravel-voicevox/index.md)
- [Creating a Laravel Starter Kit](/en/advanced/starter-kit-creation.md)
