> ## Documentation Index
> Fetch the complete documentation index at: https://docs.auriko.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Google ADK

> Use Google's Agent Development Kit with Auriko's routing and cost optimization

Use Auriko as your LLM provider in Google's Agent Development Kit (ADK).

This integration is Python-only. For TypeScript, use the [Vercel AI SDK](/frameworks/vercel-ai-sdk) integration.

## Prerequisites

* An [Auriko API key](https://auriko.ai/signup?redirectTo=%2Fdashboard%3Ftab%3Dapi-keys)

## Install

```bash theme={null}
pip install "auriko[adk]"
```

## Use SDK adapter

Use the `AurikoLlm` adapter:

```python theme={null}
from auriko.frameworks.adk import AurikoLlm

llm = AurikoLlm(model="gpt-5.4")
```

`AurikoLlm` is a native `BaseLlm` implementation that supports text and function calling. It maps OpenAI API errors to typed Auriko error classes.

```python theme={null}
import asyncio
from auriko.frameworks.adk import AurikoLlm
from google.adk import Agent, Runner
from google.adk.sessions import InMemorySessionService
from google.genai import types

llm = AurikoLlm(model="gpt-5.4")

agent = Agent(
    model=llm,
    name="assistant",
    instruction="You are a helpful assistant.",
)

session_service = InMemorySessionService()
runner = Runner(agent=agent, app_name="my_app", session_service=session_service, auto_create_session=True)

user_message = types.Content(
    role="user", parts=[types.Part(text="What is 2+2?")]
)

async def main():
    async for event in runner.run_async(user_id="user-1", session_id="session-1", new_message=user_message):
        if event.content and event.content.parts:
            for part in event.content.parts:
                if part.text:
                    print(part.text, end="", flush=True)

asyncio.run(main())
```

<Note>
  `inline_data` and `file_data` parts raise `NotImplementedError`.
</Note>

## Configure options

| Parameter  | Type                     | Default                      | Description           |
| ---------- | ------------------------ | ---------------------------- | --------------------- |
| `model`    | `str`                    | (required)                   | Model ID              |
| `api_key`  | `str`                    | `AURIKO_API_KEY` env         | API key               |
| `routing`  | `RoutingOptions \| None` | `None`                       | Routing configuration |
| `base_url` | `str`                    | `"https://api.auriko.ai/v1"` | API base URL          |

## Configure routing

Pass a `RoutingOptions` instance to control routing:

```python theme={null}
from auriko.frameworks.adk import AurikoLlm
from auriko.route_types import RoutingOptions

llm = AurikoLlm(
    model="gpt-5.4",
    routing=RoutingOptions(optimize="cost"),
)
```

## Configure manually

<Accordion title="Alternative: configure ADK with LiteLlm manually">
  If you prefer to use Google's `LiteLlm` class directly:

  ```python theme={null}
  import os
  from google.adk.models.lite_llm import LiteLlm

  llm = LiteLlm(
      model="openai/gpt-5.4",
      api_key=os.environ["AURIKO_API_KEY"],
      api_base="https://api.auriko.ai/v1",
      custom_llm_provider="openai",
  )
  ```

  <Warning>
    LiteLLM ignores `api_base` for model names containing provider keywords (like `gpt` or `claude`). Always include `custom_llm_provider="openai"` to force LiteLLM to respect your custom base URL.
  </Warning>

  For routing options and typed error mapping, use `AurikoLlm`.
</Accordion>
