RubyLLM is a Ruby gem that provides a unified interface for multiple AI providers including OpenAI, Anthropic, Google Gemini, AWS Bedrock, Mistral, and more. Braintrust traces RubyLLM applications to capture LLM calls, tool usage, and performance metrics across any supported provider.Documentation Index
Fetch the complete documentation index at: https://braintrust.dev/docs/llms.txt
Use this file to discover all available pages before exploring further.
This guide covers manual instrumentation. For quicker setup, use auto-instrumentation.
Setup
Install the Braintrust Ruby SDK and RubyLLM:.env
Trace with RubyLLM
Enable automatic tracing by wrapping RubyLLM with Braintrust:app.rb
- Chat completions across any provider
- Tool/function calls
- Token usage metrics
- Streaming responses