Skip to main content

AI Gateway

Overview

Microsoft AutoGen is a framework for building multi-agent conversational AI systems with collaborative problem-solving through automated agent interactions. Connecting AutoGen to Orq.ai’s AI Gateway provides access to 300+ models for multi-agent workflows with a single configuration change.

Key Benefits

Orq.ai’s AI Gateway enhances AutoGen applications with:

Complete Observability

Track every agent conversation, tool use, and multi-agent interaction

Built-in Reliability

Automatic fallbacks, retries, and load balancing for production resilience

Cost Optimization

Real-time cost tracking and spend management across all AI operations

Multi-Provider Access

Access 300+ LLMs and 20+ providers through a single, unified integration

Prerequisites

Before integrating AutoGen with Orq.ai, ensure the following are in place:
  • An Orq.ai account and API Key
  • Python 3.10 or higher
To set up an API key, see API keys & Endpoints.

Installation

Configuration

Configure AutoGen to use Orq.ai’s AI Gateway via OpenAIChatCompletionClient with a custom base_url:
Python
base_url: https://api.orq.ai/v3/router
The model_info dict is required when using a custom base_url so AutoGen knows the model’s capabilities.

Basic Agent Example

Python

Multi-Agent Team

Orchestrate multiple specialized agents with RoundRobinGroupChat:
Python

Model Selection

Orq.ai supports any model from 20+ providers:
Python