Skip to main content

Overview

Quraite provides a built-in adapter for Smolagents. This adapter allows you to integrate Smolagents agents with Quraite and run evaluations on them. This adapter uses OpenInference instrumentation to capture the trajectory of the agent.

Prerequisites

  • Agent dependencies: smolagents[openai] package, OpenAI API key, and any tools you want to use.
  • Quraite dependencies: quraite[smolagents-oi] package.

Define Your Smolagents Agent

You create a normal Smolagents ToolCallingAgent first, exactly as you would in any Smolagents project.

Set up Tracing

Quraite provides a tracing setup helper. For Smolagents, pass the Framework.SMOLAGENTS enum:

Wrap the Smolagents Agent

Wrap the agent with the SmolagentsAdapter and pass the tracer_provider to it.

Run the Agent

Once wrapped, you expose the adapter using Quraite’s run_agent helper.

End-to-End Examples