Introduction to the Agent Platform SDK for Python

The Agent Platform SDK for Python helps you automate data ingestion, train models, and get predictions on Gemini Enterprise Agent Platform. The Agent Platform SDK uses Python code to access the Agent Platform API so that you can programmatically accomplish most of what you can do in the Google Cloud console.

To learn how to install or update the Agent Platform SDK for Python, see Install the Agent Platform SDK for Python. For more information, see the Agent Platform SDK for Python API reference documentation.

Why use the Agent Platform SDK

The Agent Platform SDK for Python is recommended if you're an experienced machine learning (ML) and artificial intelligence (AI) engineer or a data scientist who wants to programmatically automate your workflow. The Agent Platform SDK for Python is similar to the Gemini Enterprise Agent Platform Python client library, except the Agent Platform SDK is higher-level and less granular. For more information, see Understand the SDK and client library differences.

Write code with the Agent Platform SDK for Python

To use the Agent Platform SDK for Python:

  1. Install the google-cloud-aiplatform package, which includes both the Agent Platform SDK for Python and the Gemini Enterprise Agent Platform Python client library, by running the following command in your virtual environment:

    pip install --upgrade google-cloud-aiplatform
    
  2. Use the following code to import the google.cloud.aiplatform namespace:

    from google.cloud import aiplatform