> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://www.respan.ai/docs/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://www.respan.ai/docs/_mcp/server.

# Google ADK (gateway)

> Set up Google ADK with the Respan gateway.

Route Google ADK model calls through the Respan gateway to use models and provider credentials configured in Respan. The gateway setup uses `RESPAN_API_KEY` for the model request path.

## Setup

#### Install packages

**`Python`**

```bash Python
pip install "google-adk[extensions]"
```

**`TypeScript`**

```bash TypeScript
npm install @google/adk
```

#### Set environment variables

```bash
export RESPAN_API_KEY="YOUR_RESPAN_API_KEY"
```

No provider credentials are needed in your application when the request is routed through the Respan gateway.

#### Point ADK to the Respan gateway

**`Python`**

```python Python
import os
from google.adk.agents import Agent
from google.adk.models.lite_llm import LiteLlm

agent = Agent(
    name="assistant",
    model=LiteLlm(
        model="gpt-5-mini",
        api_key=os.environ["RESPAN_API_KEY"],
        api_base="https://api.respan.ai/api",
    ),
    instruction="You are a concise assistant.",
)
```

**`TypeScript`**

```typescript TypeScript
import { ApigeeLlm, InMemoryRunner, LlmAgent } from "@google/adk";

const agent = new LlmAgent({
  name: "assistant",
  model: new ApigeeLlm({
    model: "apigee/gemini/v1beta/gemini-3.5-flash",
    proxyUrl: "https://api.respan.ai/api/google/gemini",
    apiKey: process.env.RESPAN_API_KEY,
  }),
  instruction: "You are a concise assistant.",
});

const runner = new InMemoryRunner({
  appName: "google-adk-gateway-demo",
  agent,
});

for await (const event of runner.runEphemeral({
  userId: "demo-user",
  newMessage: {
    role: "user",
    parts: [{ text: "Say hello in one sentence." }],
  },
})) {
  console.log(event.content?.parts?.map((part) => part.text).join(""));
}
```

## Switch models

Change the configured model to another model available through your Respan account.

**`Python`**

```python Python
agent = Agent(
    name="assistant",
    model=LiteLlm(
        model="gpt-5.5",
        api_key=os.environ["RESPAN_API_KEY"],
        api_base="https://api.respan.ai/api",
    ),
)
```

**`TypeScript`**

```typescript TypeScript
const agent = new LlmAgent({
  name: "assistant",
  model: new ApigeeLlm({
    model: "apigee/gemini/v1beta/gemini-3.1-flash-lite",
    proxyUrl: "https://api.respan.ai/api/google/gemini",
    apiKey: process.env.RESPAN_API_KEY,
  }),
});
```

See the [full model list](https://platform.respan.ai/platform/models).