# google-cloud-aiplatform

> Vertex AI API client library

- **URL**: https://www.freshcrate.ai/projects/google-cloud-aiplatform
- **Author**: Google LLC
- **Category**: Developer Tools
- **Latest version**: `v1.155.0` (2026-06-03)
- **License**: Apache 2.0
- **Source**: https://github.com/googleapis/python-aiplatform
- **Language**: Python
- **GitHub**: 880 stars, 447 forks
- **Registry**: pypi (`google-cloud-aiplatform`)
- **Tags**: `pypi`

## Description

Vertex AI SDK for Python
=================================================

|GA| |pypi| |versions| |unit-tests| |system-tests| |sample-tests|

`Vertex AI`_: Google Vertex AI is an integrated suite of machine learning tools and services for building and using ML models with AutoML or custom code. It offers both novices and experts the best workbench for the entire machine learning development lifecycle.

- `Client Library Documentation`_
- `Product Documentation`_

.. |GA| image:: https://img.shields.io/badge/support-ga-gold.svg
   :target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#general-availability
.. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-aiplatform.svg
   :target: https://pypi.org/project/google-cloud-aiplatform/
.. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-aiplatform.svg
   :target: https://pypi.org/project/google-cloud-aiplatform/
.. |unit-tests| image:: https://storage.googleapis.com/cloud-devrel-public/python-aiplatform/badges/sdk-unit-tests.svg
   :target: https://storage.googleapis.com/cloud-devrel-public/python-aiplatform/badges/sdk-unit-tests.html
.. |system-tests| image:: https://storage.googleapis.com/cloud-devrel-public/python-aiplatform/badges/sdk-system-tests.svg
   :target: https://storage.googleapis.com/cloud-devrel-public/python-aiplatform/badges/sdk-system-tests.html
.. |sample-tests| image:: https://storage.googleapis.com/cloud-devrel-public/python-aiplatform/badges/sdk-sample-tests.svg
   :target: https://storage.googleapis.com/cloud-devrel-public/python-aiplatform/badges/sdk-sample-tests.html
.. _Vertex AI: https://cloud.google.com/vertex-ai/docs
.. _Client Library Documentation: https://cloud.google.com/python/docs/reference/aiplatform/latest
.. _Product Documentation:  https://cloud.google.com/vertex-ai/docs

Installation
~~~~~~~~~~~~

.. code-block:: console

    pip install google-cloud-aiplatform


With :code:`uv`:

.. code-block:: console

    uv pip install google-cloud-aiplatform

Generative AI in the Vertex AI SDK
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

To use Gen AI features from the Vertex AI SDK, you can instantiate a Vertex SDK client with the following:

.. code-block:: Python

    import vertexai
    from vertexai import types

    # Instantiate GenAI client from Vertex SDK
    # Replace with your project ID and location
    client = vertexai.Client(project='my-project', location='us-central1')

See the examples below for guidance on how to use specific features supported by the Vertex SDK client.

Gen AI Evaluation
^^^^^^^^^^^^^^^^^

To run evaluation, first generate model responses from a set of prompts.

.. code-block:: Python

    import pandas as pd

    prompts_df = pd.DataFrame({
        "prompt": [
            "What is the capital of France?",
            "Write a haiku about a cat.",
            "Write a Python function to calculate the factorial of a number.",
            "Translate 'How are you?' to French.",
        ],

        "reference": [
            "Paris",
            "Sunbeam on the floor,\nA furry puddle sleeping,\nTwitching tail tells tales.",
            "def factorial(n):\n    if n < 0:\n        return 'Factorial does not exist for negative numbers'\n    elif n == 0:\n        return 1\n    else:\n        fact = 1\n        i = 1\n        while i <= n:\n            fact *= i\n            i += 1\n        return fact",
            "Comment ça va ?",
        ]
    })

    inference_results = client.evals.run_inference(
        model="gemini-2.5-flash-preview-05-20",
        src=prompts_df
    )

Then run evaluation by providing the inference results and specifying the metric types.

.. code-block:: Python

    eval_result = client.evals.evaluate(
        dataset=inference_results,
        metrics=[
            types.Metric(name='exact_match'),
            types.Metric(name='rouge_l_sum'),
            types.RubricMetric.TEXT_QUALITY,
        ]
    )

Agent Engine with Agent Development Kit (ADK)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

First, define a function that looks up the exchange rate:

.. code-block:: Python

    def get_exchange_rate(
        currency_from: str = "USD",
        currency_to: str = "EUR",
        currency_date: str = "latest",
    ):
        """Retrieves the exchange rate between two currencies on a specified date.

        Uses the Frankfurter API (https://api.frankfurter.app/) to obtain
        exchange rate data.

        Returns:
            dict: A dictionary containing the exchange rate information.
                Example: {"amount": 1.0, "base": "USD", "date": "2023-11-24",
                    "rates": {"EUR": 0.95534}}
        """
        import requests
        response = requests.get(
            f"https://api.frankfurter.app/{currency_date}",
            params={"from": currency_from, "to": currency_to},
        )
        return response.json()

Next, define an ADK Agent:

.. code-block:: Python

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `v1.155.0` | 2026-06-03 | High | ## [1.155.0](https://github.com/googleapis/python-aiplatform/compare/v1.154.0...v1.155.0) (2026-06-02)   ### Features  * Add Skill Registry GetSkillRevision and ListSkillRevisions to SDK ([94cd20c](https://github.com/googleapis/python-aiplatform/commit/94cd20c3f6c82bda5d6dfe5249cfd3e6992eb5bc)) * Add Skill Registry ListSkills and DeleteSkill to SDK ([57097a3](https://github.com/googleapis/python-aiplatform/commit/57097a31e1054b729bb45ec7bf1d625a7dcaeb84)) * Forward per-call `http_options` from ` |
| `v1.154.0` | 2026-05-27 | High | ## [1.154.0](https://github.com/googleapis/python-aiplatform/compare/v1.153.1...v1.154.0) (2026-05-27)   ### Features  * Add new fields ([027acc8](https://github.com/googleapis/python-aiplatform/commit/027acc8dc6569bda74de16e753e224f9fd5dc7de)) * Add Skill Registry module to Vertex AI client - Get Skill method ([df50ac0](https://github.com/googleapis/python-aiplatform/commit/df50ac050e82d7a04bd1f8e26ee3fac8406b1600)) * Make skill_id a required parameter in `skills.create` ([bc4be37](https://gith |
| `v1.153.1` | 2026-05-15 | High | ## [1.153.1](https://github.com/googleapis/python-aiplatform/compare/v1.153.0...v1.153.1) (2026-05-15)   ### Bug Fixes  * Remove google-genai version contraints ([cf4f183](https://github.com/googleapis/python-aiplatform/commit/cf4f183c085421e255267787214018de209430d1)) * Remove SDK workaround for async_retrieve_contexts. ([5aabd30](https://github.com/googleapis/python-aiplatform/commit/5aabd30b88de06f1c4d73cfd3e6d02bf4f73c943)) * Relax google-genai dep to &gt;= 2.0 ([6a17fdc](https://github.com/ |
| `v1.152.0` | 2026-05-11 | High | ## [1.152.0](https://github.com/googleapis/python-aiplatform/compare/v1.151.0...v1.152.0) (2026-05-11)   ### Features  * Add GetSkillRevision and ListSkillRevisions methods in Vertex AI Skill Registry SDK ([e4fdb7a](https://github.com/googleapis/python-aiplatform/commit/e4fdb7a5d9129cb46aa060f4c69f276b14b6864a)) * Add ListSkills and DeleteSkill methods in Vertex AI Skill Registry SDK ([8578bfd](https://github.com/googleapis/python-aiplatform/commit/8578bfd09b78990051b2839e8b0cf1f9e0cca4ef)) * Ad |
| `v1.150.0` | 2026-05-05 | High | ## [1.150.0](https://github.com/googleapis/python-aiplatform/compare/v1.149.0...v1.150.0) (2026-05-05)   ### Features  * Add Agent Engine Runtime Versioning support to SDK. ([b8eaefb](https://github.com/googleapis/python-aiplatform/commit/b8eaefb5236669953865a770ba5fddfaf2dbe2b3)) * Add Agent Engine Sandbox Snapshots Module ([f48e54b](https://github.com/googleapis/python-aiplatform/commit/f48e54b56948108aa11e49f6c56fa9b69d7f18ef)) * Add support for templates sub-module for Sandboxes in Vertex AI |
| `v1.149.0` | 2026-04-27 | High | ## [1.149.0](https://github.com/googleapis/python-aiplatform/compare/v1.148.1...v1.149.0) (2026-04-27)   ### Features  * Add asyncQueryReasoningEngine to aiplatform v1 API ([6332d33](https://github.com/googleapis/python-aiplatform/commit/6332d3338e18b05cfb4b5f6dd115a454036d7c01)) * Add asyncQueryReasoningEngine to aiplatform v1beta1 API ([6332d33](https://github.com/googleapis/python-aiplatform/commit/6332d3338e18b05cfb4b5f6dd115a454036d7c01)) * Add delete_evaluation_metric to GenAI SDK ([6b6348 |
| `1.148.1` | 2026-04-21 | Low | Imported from PyPI (1.148.1) |
| `v1.148.1` | 2026-04-17 | High | ## [1.148.1](https://github.com/googleapis/python-aiplatform/compare/v1.148.0...v1.148.1) (2026-04-17)   ### Bug Fixes  * Disable bound token sharing check for agent_engines ([04d5092](https://github.com/googleapis/python-aiplatform/commit/04d50929e29e3b6e22398d0961e3ae4ee23af6e4)) * Fix column name inconsistency (history vs conversation_history) across evaluation flows ([37f72e5](https://github.com/googleapis/python-aiplatform/commit/37f72e5c389f69e2eecf252eebb1535de110b901)) * Fix create_sessi |
| `v1.148.1` | 2026-04-17 | High | ## [1.148.1](https://github.com/googleapis/python-aiplatform/compare/v1.148.0...v1.148.1) (2026-04-17)   ### Bug Fixes  * Disable bound token sharing check for agent_engines ([04d5092](https://github.com/googleapis/python-aiplatform/commit/04d50929e29e3b6e22398d0961e3ae4ee23af6e4)) * Fix column name inconsistency (history vs conversation_history) across evaluation flows ([37f72e5](https://github.com/googleapis/python-aiplatform/commit/37f72e5c389f69e2eecf252eebb1535de110b901)) * Fix create_sessi |
| `v1.148.1` | 2026-04-17 | High | ## [1.148.1](https://github.com/googleapis/python-aiplatform/compare/v1.148.0...v1.148.1) (2026-04-17)   ### Bug Fixes  * Disable bound token sharing check for agent_engines ([04d5092](https://github.com/googleapis/python-aiplatform/commit/04d50929e29e3b6e22398d0961e3ae4ee23af6e4)) * Fix column name inconsistency (history vs conversation_history) across evaluation flows ([37f72e5](https://github.com/googleapis/python-aiplatform/commit/37f72e5c389f69e2eecf252eebb1535de110b901)) * Fix create_sessi |

## Citation

- HTML: https://www.freshcrate.ai/projects/google-cloud-aiplatform
- Markdown: https://www.freshcrate.ai/projects/google-cloud-aiplatform.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/google-cloud-aiplatform/deps

_Generated by freshcrate.ai. Indexes pypi releases for AI-agent ecosystem packages._
