Tuning Engines
Use Tuning Engines with Agno through an OpenAI-compatible governed endpoint.
Tuning Engines exposes an OpenAI-compatible endpoint for teams that want Agno agents to run through a governed AI control plane. Agno owns the agent behavior, tools, memory, and orchestration, while Tuning Engines centralizes model access, policy checks, audit logs, traces, and usage/cost reporting.
Authentication
Create a Tuning Engines inference key and enable the model alias you want the agent to use.
export TUNING_ENGINES_API_KEY=sk-te-your-inference-key
export TUNING_ENGINES_MODEL=your-model-alias
# Optional, only when using a custom host:
export TUNING_ENGINES_BASE_URL=https://api.tuningengines.com/v1Example
Install the openai package:
uv pip install -U agno openaiUse Agno's TuningEngines model provider:
from os import getenv
from agno.agent import Agent
from agno.models.tuning_engines import TuningEngines
agent = Agent(
model=TuningEngines(
id=getenv("TUNING_ENGINES_MODEL", "your-model-alias"),
),
markdown=True,
)
agent.print_response("Share a short checklist for running production AI agents.", stream=True)Params
| Parameter | Type | Description | Default |
|---|---|---|---|
id | str | Model alias enabled in Tuning Engines | "gpt-4o" |
api_key | Optional[str] | Tuning Engines inference key, read from TUNING_ENGINES_API_KEY | None |
base_url | str | Tuning Engines OpenAI-compatible API endpoint | TUNING_ENGINES_BASE_URL or "https://api.tuningengines.com/v1" |
TuningEngines extends OpenAILike, so it supports the same OpenAI-compatible model parameters documented in OpenAI Like.
View a runnable example here.