Deploys an agent to Gemini Enterprise Agent Platform. `agent_folder` should contain the following files: - __init__.py - agent.py - requirements.txt (optional, for additional dependencies) - .env (optional, for environment variables) - ... (other required source files) Args: age
(
*,
agent_folder: str,
temp_folder: Optional[str] = None,
adk_app: Optional[str] = None,
staging_bucket: Optional[str] = None,
trace_to_cloud: Optional[bool] = None,
otel_to_cloud: Optional[bool] = None,
api_key: Optional[str] = None,
adk_app_object: Optional[str] = None,
agent_engine_id: Optional[str] = None,
absolutize_imports: bool = True,
project: Optional[str] = None,
region: Optional[str] = None,
display_name: Optional[str] = None,
description: Optional[str] = None,
requirements_file: Optional[str] = None,
env_file: Optional[str] = None,
agent_engine_config_file: Optional[str] = None,
skip_agent_import_validation: bool = True,
trigger_sources: Optional[str] = None,
memory_service_uri: Optional[str] = None,
session_service_uri: Optional[str] = None,
artifact_service_uri: Optional[str] = None,
adk_version: Optional[str] = None,
)
| 805 | |
| 806 | |
| 807 | def to_agent_engine( |
| 808 | *, |
| 809 | agent_folder: str, |
| 810 | temp_folder: Optional[str] = None, |
| 811 | adk_app: Optional[str] = None, |
| 812 | staging_bucket: Optional[str] = None, |
| 813 | trace_to_cloud: Optional[bool] = None, |
| 814 | otel_to_cloud: Optional[bool] = None, |
| 815 | api_key: Optional[str] = None, |
| 816 | adk_app_object: Optional[str] = None, |
| 817 | agent_engine_id: Optional[str] = None, |
| 818 | absolutize_imports: bool = True, |
| 819 | project: Optional[str] = None, |
| 820 | region: Optional[str] = None, |
| 821 | display_name: Optional[str] = None, |
| 822 | description: Optional[str] = None, |
| 823 | requirements_file: Optional[str] = None, |
| 824 | env_file: Optional[str] = None, |
| 825 | agent_engine_config_file: Optional[str] = None, |
| 826 | skip_agent_import_validation: bool = True, |
| 827 | trigger_sources: Optional[str] = None, |
| 828 | memory_service_uri: Optional[str] = None, |
| 829 | session_service_uri: Optional[str] = None, |
| 830 | artifact_service_uri: Optional[str] = None, |
| 831 | adk_version: Optional[str] = None, |
| 832 | ): |
| 833 | """Deploys an agent to Gemini Enterprise Agent Platform. |
| 834 | |
| 835 | `agent_folder` should contain the following files: |
| 836 | |
| 837 | - __init__.py |
| 838 | - agent.py |
| 839 | - requirements.txt (optional, for additional dependencies) |
| 840 | - .env (optional, for environment variables) |
| 841 | - ... (other required source files) |
| 842 | |
| 843 | Args: |
| 844 | agent_folder (str): The folder (absolute path) containing the agent source |
| 845 | code. |
| 846 | temp_folder (str): The temp folder for the generated Agent Platform source |
| 847 | files. It will be replaced with the generated files if it already exists. |
| 848 | adk_app (str): Deprecated. This argument is no longer required or used. |
| 849 | staging_bucket (str): Deprecated. This argument is no longer required or |
| 850 | used. |
| 851 | trace_to_cloud (bool): Deprecated. This argument is no longer required or |
| 852 | used. |
| 853 | otel_to_cloud (bool): Whether to enable exporting OpenTelemetry signals to |
| 854 | Google Cloud. |
| 855 | api_key (str): Optional. The API key to use for Express Mode. If not |
| 856 | provided, the API key from the GOOGLE_API_KEY environment variable will be |
| 857 | used. It will only be used if GOOGLE_GENAI_USE_ENTERPRISE is true. |
| 858 | adk_app_object (str): Deprecated. This argument is no longer required or |
| 859 | used. |
| 860 | agent_engine_id (str): Optional. The ID of the Agent Runtime instance to |
| 861 | update. If not specified, a new Agent Runtime instance will be created. |
| 862 | absolutize_imports (bool): Deprecated. This argument is no longer required |
| 863 | or used. |
| 864 | project (str): Optional. Google Cloud project id for the deployed agent. If |
nothing calls this directly
no test coverage detected