Skip to main content

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

AWS Strands is a framework for building AI agents with structured reasoning and tool use. By connecting AWS Strands to Orq.ai’s AI Gateway, you transform experimental agents into production-ready systems with enterprise-grade capabilities.

Key Benefits

Orq.ai’s AI Gateway enhances your AWS Strands Agents with:

Complete Observability

Track every agent step, tool use, and interaction with detailed traces and analytics

Built-in Reliability

Automatic fallbacks, retries, and load balancing for production resilience

Cost Optimization

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

Multi-Provider Access

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

Prerequisites

Before integrating AWS Strands with Orq.ai, ensure you have:
  • An Orq.ai account and API Key
  • Python 3.8 or higher
  • AWS Strands SDK installed
To setup your API key, see API keys & Endpoints.

Installation

Install the Strands Agents SDK (requires Python 3.10+):

Configuration

Configure Strands Agents to use Orq.ai’s AI Gateway by passing custom client arguments with the base URL:
base_url: https://api.orq.ai/v3/router

Basic Agent Example

Here’s a complete example of creating and running a Strands agent through Orq.ai:

Agent with Tools

Strands agents can use tools while routing through Orq.ai:

Fallback Configuration

Configure automatic fallbacks for reliability:

Observability

AWS Strands integrates with Orq.ai’s Observability Platform through OpenTelemetry. Capture complete traces of your agent interactions, tool calls, and model invocations to gain deep insights into agent behavior, performance, and costs.

Prerequisites

Before you begin, ensure you have:
  • An Orq.ai account and an API Key
  • AWS Strands SDK installed
  • Python 3.10+
The examples below use OpenAI models with OpenTelemetry tracing sent to Orq.ai. Set both OPENAI_API_KEY (for model access) and ORQ_API_KEY (for telemetry export) environment variables.

Installation

Configuration

Configure OpenTelemetry to send traces to Orq.ai:
Python

Basic Example

Python

Agent with Tools

Python

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.