AI Gateway
Route your LLM calls through the AI Gateway with a single base URL change. Zero vendor lock-in: always run on the best model at the lowest cost for your use case.
Observability
Instrument your code with OpenTelemetry to capture traces, logs, and metrics for every LLM call, agent step, and tool use.
AI Gateway
Overview
SmolAgents is a lightweight Python agent framework by Hugging Face. UsingOpenAIServerModel with a custom api_base, you can route all LLM calls through Orq.ai’s AI Gateway for access to 300+ models, cost tracking, and reliability features.
Prerequisites
- An Orq.ai account and API Key
- Python 3.9 or higher
To setup your API key, see API keys & Endpoints.
Installation
Configuration
Python
api_base: https://api.orq.ai/v3/router
Basic Agent Example
Python
Model Selection
With Orq.ai, you can use any supported model from 20+ providers:Python
Observability
Overview
SmolAgents uses theopeninference-instrumentation-smolagents library to automatically instrument agent runs and export traces via OpenTelemetry.
Prerequisites
- An Orq.ai account and API Key
- Python 3.9 or higher
Installation
Configuring Orq.ai Observability
Set up the tracer provider and instrument SmolAgents before creating any agents:SmolagentsInstrumentor must be called before any agent is instantiated. Once instrumented, all CodeAgent and ToolCallingAgent runs are automatically traced.Basic Example
Evaluations & Experiments
Once your agents are running, use Evaluatorq to score outputs across a dataset and Experiments to compare configurations side-by-side.Run Evaluations with Evaluatorq
Run parallel evaluations across your agents and compare results.
Run Experiments via the API
Compare agent configurations and view results in the AI Studio.