Google Gemini Enterprise Agent Platform SDK for Python

repository·main·Indexed 21 days ago

https://github.com/googleapis/python-aiplatform

A client library for building, scaling, governing, and optimizing AI agents on Google Cloud's Gemini Enterprise Agent Platform (formerly Vertex AI). The SDK provides tools for the Model Garden, Skill Registry, Agent Engine deployment via the Agent Development Kit (ADK), prompt optimization (including VAPO), and Custom Prediction Routines (CPR) for building custom serving containers.

Tokens
58.8K
Snippets
139
Records
230
Agent score
74%

What's inside googleapis-python-aiplatform

  1. Understand the PersistentResourceServiceTransport inheritance structure

    main

    The PersistentResourceServiceTransport serves as the Abstract Base Class (ABC) for all transport implementations within the PersistentResourceService. Depending on your application's requirements for concurrency and protocol, you should choose one of the following public transport classes:

    • Sync gRPC: Use PersistentResourceServiceGrpcTransport for synchronous gRPC communication.
    • Async gRPC: Use PersistentResourceServiceGrpcAsyncIOTransport for asynchronous gRPC communication using asyncio.
    • Sync REST: Use PersistentResourceServiceRestTransport for synchronous REST communication.

    Internal implementation details, such as the private _BasePersistentResourceServiceRestTransport and its associated _BaseMETHOD classes, are used to build the public REST transport but should not be used directly by end-users.

  2. Understand the DeploymentResourcePoolService transport inheritance structure

    main

    The DeploymentResourcePoolServiceTransport serves as the Abstract Base Class (ABC) for all transport implementations used by the DeploymentResourcePoolService. Depending on your application's concurrency model and protocol requirements, you can choose from the following transport types:

    gRPC Transports

    • DeploymentResourcePoolServiceGrpcTransport: Use this for synchronous gRPC communication. It is defined in grpc.py.
    • DeploymentResourcePoolServiceGrpcAsyncIOTransport: Use this for asynchronous gRPC communication using asyncio. It is defined in grpc_asyncio.py.

    REST Transports

    • DeploymentResourcePoolServiceRestTransport: Use this for synchronous REST communication. It is defined in rest.py and utilizes inner classes named METHOD (which are derived from the base REST method classes).
    • _BaseDeploymentResourcePoolServiceRestTransport: This is a private base class for REST transports, containing the _BaseMETHOD inner classes. It is defined in rest_base.py and is not intended for direct end-user instantiation.
  3. Understand the EvaluationService transport inheritance structure

    main

    The EvaluationService uses a hierarchical transport structure to support different communication protocols (gRPC vs. REST) and execution models (Synchronous vs. Asynchronous).

    • EvaluationServiceTransport: The Abstract Base Class (ABC) that defines the interface for all transports.
    • gRPC Transports:
      • EvaluationServiceGrpcTransport: Use this for synchronous gRPC communication (defined in grpc.py).
      • EvaluationServiceGrpcAsyncIOTransport: Use this for asynchronous gRPC communication (defined in grpc_asyncio.py).
    • REST Transports:
      • EvaluationServiceRestTransport: Use this for synchronous REST communication (defined in rest.py). It implements specific METHOD classes derived from the base REST implementation.
      • _BaseEvaluationServiceRestTransport: A private base class for REST transports (defined in rest_base.py).
  4. Understand the NotebookService transport inheritance structure

    main

    The NotebookService transport layer follows an inheritance hierarchy that allows you to choose between gRPC (synchronous or asynchronous) and REST (synchronous) communication protocols.

    • NotebookServiceTransport: The Abstract Base Class (ABC) that defines the interface for all transports.
    • gRPC Transports:
      • NotebookServiceGrpcTransport: Use this for synchronous gRPC communication (defined in grpc.py).
      • NotebookServiceGrpcAsyncIOTransport: Use this for asynchronous gRPC communication (defined in grpc_asyncio.py).
    • REST Transports:
      • NotebookServiceRestTransport: The public interface for synchronous REST communication (defined in rest.py). It uses METHOD inner classes derived from the base REST implementation.
      • _BaseNotebookServiceRestTransport: A private base class for REST transports (defined in rest_base.py).
  5. Understand the FeatureOnlineStoreService transport inheritance structure

    main

    The FeatureOnlineStoreService uses a hierarchical transport structure to support different communication protocols (gRPC vs. REST) and execution models (Synchronous vs. Asynchronous).

    All transports inherit from the abstract base class FeatureOnlineStoreServiceTransport. Depending on your application's requirements, you should choose one of the following public transport implementations:

    • Synchronous gRPC: Use FeatureOnlineStoreServiceGrpcTransport for standard synchronous gRPC calls.
    • Asynchronous gRPC: Use FeatureOnlineStoreServiceGrpcAsyncIOTransport for non-blocking gRPC calls using asyncio.
    • Synchronous REST: Use FeatureOnlineStoreServiceRestTransport for standard synchronous RESTful API calls.

    Note that _BaseFeatureOnlineStoreServiceRestTransport is a private base class used to implement the REST logic and is not intended for direct end-user instantiation.

  6. Understand the VertexRagDataService transport inheritance structure

    main

    The VertexRagDataService supports multiple transport mechanisms (gRPC and REST) for communicating with the Vertex RAG Data service. All transports inherit from the abstract base class VertexRagDataServiceTransport.

    Depending on your application's concurrency model and protocol requirements, you can choose from the following public transport implementations:

    • Sync gRPC: Use VertexRagDataServiceGrpcTransport (defined in grpc.py) for synchronous gRPC calls.
    • Async gRPC: Use VertexRagDataServiceGrpcAsyncIOTransport (defined in grpc_asyncio.py) for asynchronous gRPC calls using asyncio.
    • Sync REST: Use VertexRagDataServiceRestTransport (defined in rest.py) for synchronous RESTful API calls.

    Internal implementation details for REST are managed via a private base class _BaseVertexRagDataServiceRestTransport and its corresponding _BaseMETHOD inner classes.

  7. Understand the ReasoningEngineService transport inheritance structure

    main

    The ReasoningEngineService uses a hierarchical transport structure to support different communication protocols (gRPC vs. REST) and execution models (Synchronous vs. Asynchronous).

    All transports inherit from the abstract base class ReasoningEngineServiceTransport. Depending on your application's requirements, you should choose one of the following public transport implementations:

    • Synchronous gRPC: Use ReasoningEngineServiceGrpcTransport for standard synchronous gRPC calls.
    • Asynchronous gRPC: Use ReasoningEngineServiceGrpcAsyncIOTransport for non-blocking asyncio-based gRPC calls.
    • Synchronous REST: Use ReasoningEngineServiceRestTransport for standard synchronous RESTful API calls.

    Internal implementation details, such as the private _BaseReasoningEngineServiceRestTransport and its associated _BaseMETHOD classes, are used to build the public REST transport but should not be used directly by end-users.

  8. Understand the ModelGardenService transport inheritance structure

    main

    The ModelGardenService uses a hierarchical transport structure to support different communication protocols (gRPC and REST) and execution models (synchronous and asynchronous).

    • ModelGardenServiceTransport: The Abstract Base Class (ABC) that defines the interface for all transports.
    • gRPC Transports:
      • ModelGardenServiceGrpcTransport: Used for synchronous gRPC communication (defined in grpc.py).
      • ModelGardenServiceGrpcAsyncIOTransport: Used for asynchronous gRPC communication (defined in grpc_asyncio.py).
    • REST Transports:
      • ModelGardenServiceRestTransport: The public interface for synchronous REST communication (defined in rest.py). It uses METHOD inner classes derived from the base REST implementation.
      • _BaseModelGardenServiceRestTransport: A private base class for REST transports that defines _BaseMETHOD inner classes (defined in rest_base.py).
  9. Understand the DatasetService transport inheritance structure

    main

    The DatasetService uses a hierarchical transport structure to support different communication protocols (gRPC vs. REST) and execution models (Synchronous vs. Asynchronous).

    • DatasetServiceTransport: The Abstract Base Class (ABC) that defines the interface for all transports.
    • gRPC Transports:
      • DatasetServiceGrpcTransport: Used for synchronous gRPC communication (defined in grpc.py).
      • DatasetServiceGrpcAsyncIOTransport: Used for asynchronous gRPC communication via asyncio (defined in grpc_asyncio.py).
    • REST Transports:
      • DatasetServiceRestTransport: The public interface for synchronous REST communication (defined in rest.py). It uses METHOD inner classes derived from the base REST implementation.
      • _BaseDatasetServiceRestTransport: A private base class for REST transports that defines the core _BaseMETHOD logic (defined in rest_base.py).
  10. Understand the TensorboardService transport inheritance structure

    main

    The TensorboardServiceTransport acts as the Abstract Base Class (ABC) for all communication transports used by the Tensorboard service. Depending on your application's concurrency model (synchronous vs. asynchronous) and preferred protocol (gRPC vs. REST), you can choose from the following implementations:

    gRPC Transports

    • TensorboardServiceGrpcTransport: Use this for standard synchronous gRPC communication. It is defined in grpc.py.
    • TensorboardServiceGrpcAsyncIOTransport: Use this for asynchronous gRPC communication using asyncio. It is defined in grpc_asyncio.py.

    REST Transports

    • TensorboardServiceRestTransport: Use this for standard synchronous REST communication. It is defined in rest.py and utilizes METHOD inner classes derived from the base REST implementation.
    • _BaseTensorboardServiceRestTransport: A private base class for REST transports (defined in rest_base.py) that provides the underlying _BaseMETHOD logic.
  11. Understand the MigrationService transport inheritance structure

    main

    The MigrationService uses a hierarchical transport structure to support different communication protocols (gRPC vs. REST) and execution models (Synchronous vs. Asynchronous).

    • MigrationServiceTransport: The Abstract Base Class (ABC) that defines the interface for all transports.
    • gRPC Transports:
      • MigrationServiceGrpcTransport: Used for synchronous gRPC communication (defined in grpc.py).
      • MigrationServiceGrpcAsyncIOTransport: Used for asynchronous gRPC communication (defined in grpc_asyncio.py).
    • REST Transports:
      • MigrationServiceRestTransport: The public interface for synchronous REST communication (defined in rest.py). It uses METHOD inner classes derived from the base REST implementation.
      • _BaseMigrationServiceRestTransport: A private base class for REST transports that provides the underlying logic via _BaseMETHOD inner classes (defined in rest_base.py).