SDK — Ruby[ v2.x ]

[ 00 ]overview

A Rubyist's SDK — clean DSL, thread-safe, and integrates naturally with Rails and Sidekiq.

API Reference

[ 01 ]Install

terminal — install

$ gem install myndlabs

[ 02 ]Quick start

quickstart.rb
require "myndlabs"

client = Myndlabs::Client.new(api_key: ENV["MYND_API_KEY"])

agent = client.agents.create(
  name: "my-agent",
  model: "auto",
  instructions: "You are a helpful assistant.",
)

run = client.agents.run(
  agent.id,
  input: "Explain quantum computing in one sentence.",
)

puts run.output

[ 03 ]Features

Rails integration

Drop-in initializer, job adapters for Sidekiq and Solid Queue.

Thread-safe

Connection pooling and thread-safe client — safe for multi-threaded Ruby.

Idiomatic DSL

Block-style configuration, snake_case params, and Ruby-style error handling.

Everything else — auth, streaming, errors, pagination — lives in the documentation.

Full docs