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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package google-agent-platform

aisdk/google-agent-platform

GitHub Workflow Status Total Downloads Latest Version License Why PHP in 2026


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:

Testing

The default suite uses protocol fixtures and conformance checks. Credentialed Live network verification is separate from the default test run.

Documentation

Community


All versions of google-agent-platform with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
aisdk/core Version ^0.8.0
aisdk/openai-compatible Version ^0.8.0
google/auth Version ^1.45
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package aisdk/google-agent-platform contains the following files

Loading the files please wait ...