aisdk / google-agent-platform
Official Google Cloud Agent Platform (Vertex AI) provider for the PHP AI SDK.
Fund package maintenance!
v0.11.0
2026-10-31 02:58 UTC
Requires
- php: ^8.3
- aisdk/core: ^0.11.0
- aisdk/openai-compatible: ^0.11.0
- google/auth: ^1.45
Requires (Dev)
- laravel/pint: ^1.18
- nyholm/psr7: ^1.8
- pestphp/pest: ^3.0 || ^4.0
- phpstan/phpstan: ^2.0
- rector/rector: ^2.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Google Cloud Agent Platform (formerly Vertex AI) provider for the framework-agnostic PHP AI SDK. Supports text, images, speech, embeddings, video, and live sessions.
Installation
composer require aisdk/google-agent-platform
Set GOOGLE_VERTEX_PROJECT, GOOGLE_VERTEX_LOCATION, and GOOGLE_VERTEX_ACCESS_TOKEN in your environment. Service account credentials are also supported.
Usage
use AiSdk\Generate; use AiSdk\GoogleAgentPlatform; $result = Generate::text('Explain closures in PHP in one sentence.') ->model(GoogleAgentPlatform::model('google/gemini-3.8-flash')) ->run(); echo $result->text;
The existing GOOGLE_VERTEX_* environment names remain supported.
Documentation
Read the documentation for configuration, supported features, and more examples.
License
The MIT License (MIT). See LICENSE for details.