Ruby Client
The official Ruby gem for Brainz Lab. Integrate all 31 products with a single gem install. Built for Rails developers.
Before
You
Help me add event tracking to our Rails app. I want to track signups.
I can help you integrate an analytics service, but I'll need you to manually configure API keys, set up the client, and handle errors.
Here's how to add Segment or Mixpanel manually...
After
You
Help me add event tracking to our Rails app. I want to track signups.
# In your UsersController
def create
@user = User.create!(user_params)
Brainz::Pulse.track("user.signup", user: @user)
end
SDK Features Used
• Auto-configured from Rails credentials
• Async by default (non-blocking)
• Auto-enriches with request context
• Batches events for efficiency
One line of code. The SDK handles configuration, batching, retries, and error handling automatically.
Clean, idiomatic Ruby for every Brainz Lab product
Brainz::Pulse.track(event, data)
Track custom events
Brainz::Recall.search(query)
Search with AI
Brainz::Reflex.cache(key) { ... }
Smart caching
Brainz::Vault.encrypt(data)
Secure secrets
The SDK is the heart of the Brainz Lab developer experience. Built by Rails developers, for Rails developers.