basic.py
Run the Example
1
Set up your virtual environment
2
Install dependencies
3
Export your API keys
4
Run the example
Save the code above as
basic.py, then run:Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Use Agno with Tuning Engines as an OpenAI-compatible endpoint.
"""Use Agno with Tuning Engines as an OpenAI-compatible endpoint."""
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", "gpt-4o"),
),
markdown=True,
)
agent.print_response(
"Explain how governance, traces, and usage reporting help production AI agents.",
stream=True,
)
Set up your virtual environment
uv venv --python 3.12
source .venv/bin/activate
uv venv --python 3.12
.venv\Scripts\activate
Install dependencies
uv pip install -U agno openai
Export your API keys
export TUNING_ENGINES_API_KEY="your_tuning_engines_api_key_here"
$Env:TUNING_ENGINES_API_KEY="your_tuning_engines_api_key_here"
Run the example
basic.py, then run:python basic.py
Was this page helpful?