| [ Web Proxy ] |
| Viewing: https://adk.dev/integrations/../../live/dev-guide/../../../sessions/session/../../../agents/models/ | [Back] [Original] |
[logo]
Agent Development Kit (ADK) is designed for flexibility, allowing you to integrate various Large Language Models (LLMs) into your agents. This section details how to leverage Gemini and integrate other popular models effectively, including those hosted externally or running locally.
ADK provides several mechanisms for model integration:
Direct String / Registry: For models tightly integrated with Google Cloud, such as Gemini models accessed via Google AI Studio or Agent Platform, or models hosted on Agent Platform endpoints. You access these models by providing the model name or endpoint resource string and ADK's internal registry resolves this string to the appropriate backend client.
Model connectors: For broader compatibility, especially models outside
the Google ecosystem or those requiring specific client configurations, such
as models accessed via Apigee or LiteLLM. You instantiate a specific wrapper
class, such as ApigeeLlm or LiteLlm, and pass this object as the model
parameter to your LlmAgent.
Model routing: For dynamically selecting between multiple models at runtime using a router function, with automatic failover on error.
| Web Proxy Viewer | New URL | Original Page |