Google ADK
Google ADK (Agent Development Kit) standardizes agent development across Python, Java, TypeScript, and Go. Google ADK uses LiteLLM for model access. Configure LiteLLM to use Glitch by setting environment variables.
Configuration
Section titled “Configuration”Google ADK uses LiteLLM models. Configure LiteLLM to point to Glitch:
import osfrom google.adk.agents import LlmAgentfrom google.adk.models.lite_llm import LiteLlm
# Configure LiteLLM to use Glitch for OpenAI models# LiteLLM reads these environment variablesos.environ["OPENAI_API_BASE"] = "https://api.golabrat.ai/v1"os.environ["OPENAI_API_KEY"] = os.environ["GLITCH_API_KEY"] # Your Glitch API key
# Create agent with Glitch-secured modelagent = LlmAgent( model=LiteLlm(model="openai/gpt-4o"), # LiteLLM will route through Glitch name="glitch_secured_agent", instruction="You are a helpful assistant.",)Basic Example
Section titled “Basic Example”import osfrom google.adk.agents import LlmAgentfrom google.adk.models.lite_llm import LiteLlm
# Configure LiteLLM to use Glitchos.environ["OPENAI_API_BASE"] = "https://api.golabrat.ai/v1"os.environ["OPENAI_API_KEY"] = os.environ["GLITCH_API_KEY"]
# Create agent - all LLM calls are secured via Glitchagent = LlmAgent( model=LiteLlm(model="openai/gpt-4o"), name="my_agent", instruction="You are a helpful assistant.",)
# Use the agentresponse = await agent.run("What is the capital of France?")print(response)Using Different Models
Section titled “Using Different Models”Google ADK supports multiple models through LiteLLM. All models configured to use OpenAI-compatible endpoints will route through Glitch:
# OpenAI models (via Glitch)agent_openai = LlmAgent( model=LiteLlm(model="openai/gpt-4o"), name="openai_agent", instruction="You are a helpful assistant.",)
# Anthropic models can also use Glitch if configured# (Note: Glitch supports OpenAI-compatible endpoints)agent_claude = LlmAgent( model=LiteLlm(model="anthropic/claude-3-haiku-20240307"), name="claude_agent", instruction="You are a helpful assistant.",)Next Steps
Section titled “Next Steps”- Frameworks Overview — Other framework integrations
- Quick Start — Get running in 5 minutes
- API Reference — Full endpoint documentation