Skip to main content
Aion provides a helper function to create a Google ADK LiteLlm model instance that is automatically configured for use within the Aion framework. The helper handles authentication and bearer token refresh transparently, so you can focus on your agent logic.

Import

from aion.adk.authoring import aion_lite_llm

Overview

from google.adk.agent import Agent

from aion.adk.authoring import aion_lite_llm

agent = Agent(
    name="my_agent",
    model=aion_lite_llm("model-id-from-control-plane"),
)
The model ID is the identifier from the Aion control-plane model catalog, not a raw provider model name.

aion_lite_llm(...)

aion_lite_llm(
    model: str,
    **kwargs: Any,
) -> LiteLlm
Create a Google ADK LiteLlm instance configured for Aion. Aion resolves the bearer token and principal selector headers on every completion call, so the model always uses fresh credentials without any extra setup in your agent code. Parameters:
ParameterTypeDescription
modelstrModel ID from the Aion control plane model catalog
**kwargsAnyAdditional keyword arguments forwarded to ADK’s LiteLlm
Returns: A Google ADK LiteLlm instance backed by Aion’s model proxy. Raises:
  • ImportError — If google-adk with LiteLlm support is not installed
Example:
from google.adk.agent import Agent

from aion.adk.authoring import aion_lite_llm

agent = Agent(
    name="research_agent",
    model=aion_lite_llm("model-id-from-control-plane"),
    instruction="You are a helpful research assistant.",
)

Usage with MCP Tools

aion_lite_llm is typically paired with aion_adk_mcp_toolset when the agent needs tools from Aion’s control plane:
from google.adk.agent import Agent

from aion.adk.authoring import aion_adk_mcp_toolset, aion_lite_llm
from aion.api import CapabilityReference, CapabilitySubjectSource, RuntimeCapabilityReference

agent = Agent(
    name="support_agent",
    model=aion_lite_llm("model-id-from-control-plane"),
    tools=[
        aion_adk_mcp_toolset(
            capability_references=[
                CapabilityReference.global_mcp(),
            ],
            runtime_capability_references=[
                RuntimeCapabilityReference.primary_mcp(
                    CapabilitySubjectSource.INCOMING_DISTRIBUTION
                ),
            ],
        )
    ],
)