Download the PHP package aisdk/google-agent-platform without Composer
On this page you can find all versions of the php package aisdk/google-agent-platform. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download aisdk/google-agent-platform
More information about aisdk/google-agent-platform
Files in aisdk/google-agent-platform
Package google-agent-platform
Short Description Official Google Cloud Agent Platform (Vertex AI) provider for the PHP AI SDK.
License MIT
Homepage https://github.com/phpaisdk/google-agent-platform
Informations about the package google-agent-platform
aisdk/google-agent-platform
Official Google Cloud Agent Platform provider for the framework-agnostic PHP AI SDK. It uses the OpenAI-compatible endpoint for text and transcription, and native publisher model endpoints for embeddings, image, and speech generation.
Installation
Basic Usage
Embeddings
The package sends one native publisher-model request per input, which supports the documented single-input limit of gemini-embedding-001. Provider options use Google's documented field names: task_type, title, autoTruncate, and outputDimensionality.
Publisher and routed model IDs pass through unchanged and do not need to be registered. This package does not ship a model inventory; the SDK performs internal adapter validation before Google Cloud validates support for the selected model, project, and location.
Image and speech generation
Native embedding, image, and speech generation require project; a custom OpenAI-compatible baseUrl alone is not enough to construct the publisher model endpoint.
Transcription
Transcription uses the routed multimodal model endpoint, so it follows the same authentication and model-id rules as text generation.
Live voice sessions
Install the optional transport package for a ready-made WebSocket connection:
Core automatically runs registered tools that have handlers and sends the provider's required function response. Tool calls without a matching handler are emitted for manual handling.
Provider-only setup fields can be merged without adding them to core. For example, a previously received session-resumption handle can be supplied with:
Resumption updates and unknown native messages are preserved as ProviderEvent
values.
Agent Platform Live sessions can emit input and output transcripts, but this
package does not claim dedicated Live::transcribe() or Live::translate()
implementations. Google Cloud Speech-to-Text streaming is a separate gRPC
service, and Gemini Developer API Live Translate's translationConfig protocol
is not documented for the Agent Platform endpoint.
Core-only transport
The provider is fully usable without aisdk/transport. Pass any application
implementation of the core transport contracts:
See the core custom-transport guide for a complete implementation. The connection receives the current native v1 Agent Platform WebSocket endpoint and OAuth, ADC, or API-key headers prepared by this package.
Agent Platform's native Live WebSocket streams media directly. With the default
server-side activity detection, speech boundaries are detected automatically
and the protocol does not document a separate audio commit event. When turn
detection is disabled, commitAudio() sends the documented manual
activity-end signal. clearAudio() remains unsupported because the protocol
has no input buffer.
It also does not expose the client-secret, WebRTC, or SIP lifecycle implemented
by providers that officially support those topologies.
Streaming
Video Generation
Veo operations use the native publisher-model endpoint and can return inline video bytes or a Cloud Storage URI.
Reasoning and multimodal input
Portable reasoning maps to Google's native thinking configuration. Effort levels become thinking_level, while token budgets become thinking_budget:
Google-specific extra_body.google.thinking_config provider options take precedence when supplied explicitly. Text requests also accept documented image and audio inputs; audio formats are serialized using Google's MIME-style values such as audio/wav.
Configuration
| Variable | Description |
|---|---|
GOOGLE_CLOUD_PROJECT / GOOGLE_VERTEX_PROJECT |
Google Cloud project id (required unless baseUrl set) |
GOOGLE_CLOUD_LOCATION / GOOGLE_VERTEX_LOCATION |
Region (defaults to global) |
GOOGLE_VERTEX_ACCESS_TOKEN |
Static OAuth access token |
GOOGLE_VERTEX_CREDENTIALS_PATH |
Path to a service account JSON key |
GOOGLE_APPLICATION_CREDENTIALS |
Standard ADC service-account path |
GOOGLE_VERTEX_API_KEY |
API key (express mode) |
Authentication
Authentication is powered by the official google/auth
library and supports the full set of Google credential sources:
- Application Default Credentials (ADC) — used automatically when no
explicit credential is given:
GOOGLE_APPLICATION_CREDENTIALS,gclouduser credentials, GCE/GKE metadata server, and workload identity federation. - Service account — JSON key as an array or file path (OAuth token exchange handled for you).
- Static OAuth access token — bring your own (e.g.
gcloud auth print-access-token). - API key — express mode via the
x-goog-api-keyheader.
Testing
The default suite uses protocol fixtures and conformance checks. Credentialed Live network verification is separate from the default test run.
Documentation
Community
- Contributing
- Support
- For private security reports, email [email protected].
All versions of google-agent-platform with dependencies
aisdk/core Version ^0.8.0
aisdk/openai-compatible Version ^0.8.0
google/auth Version ^1.45