Ruby gem for AI composability, inspired by LangChain
Top 67.6% on sourcepulse
Boxcars is a Ruby gem for building AI-powered applications with composability, inspired by LangChain. It allows developers to chain together various components like LLMs (OpenAI, Anthropic, GPT4All), search engines, SQL databases, and Rails Active Record to solve complex problems.
How It Works
Boxcars utilizes a modular architecture with core concepts: Boxcar
(an atomic unit of work like search or SQL execution), Engine
(LLM interfaces like OpenAI), Prompt
(templates for LLM interaction), VectorStore
(for vector data), and Train
(orchestrates multiple Boxcars, currently with a ZeroShot
implementation). This composable approach allows for flexible and extensible AI workflows.
Quick Start & Requirements
gem install boxcars
or add gem 'boxcars'
to your Gemfile and run bundle install
.OPENAI_ACCESS_TOKEN
, ANTHROPIC_API_KEY
, SERPAPI_API_KEY
).require "boxcars"
. See Documentation for examples.Highlighted Details
Train
concept for chaining operations, exemplified by ZeroShot
.Maintenance & Community
Licensing & Compatibility
Limitations & Caveats
The project is actively seeking ways to improve security against prompt manipulation. While inspired by LangChain, it is a newer implementation with ongoing development and feature expansion.
1 month ago
1 day