BoxcarsAI/boxcars

Building applications with composability using Boxcars with LLM's.

What it solves

Boxcars reduces the cognitive load for Ruby and Rails developers building LLM-powered systems. It provides a unified framework to coordinate search, data queries, API calls, and retrieval without needing to write one-off wrappers for every different AI provider or tool.

How it works

Boxcars uses a modular architecture based on three primary concepts:

  • Boxcars: Single-purpose tools (e.g., calculators, SQL queries, or API calls) that perform specific tasks.
  • Trains: Orchestrators that take a list of Boxcars and an LLM engine to break down a complex problem into steps for the tools to solve.
  • Engines: Connectors to various LLM providers (such as OpenAI, Anthropic, Groq, and Ollama) that generate the text and logic required to drive the tools.

It also includes StationAgents for higher-level agent abstractions with lifecycle callbacks and VectorStores for managing embeddings and retrieval.

Who it’s for

Ruby and Rails teams who want to build AI assistants, internal copilots, or operations bots using a consistent programming model that integrates easily with their existing ActiveRecord and SQL data.

Highlights

  • Tool Composability: Package domain logic as reusable Boxcar objects across different services.
  • MCP Integration: Connects to Model Context Protocol (MCP) servers to merge remote tools with local Ruby tools.
  • Provider Flexibility: Supports a wide array of engines including OpenAI, Anthropic, Gemini, and local models via Ollama.
  • Structured Output: Enforces JSON contracts using JSON Schema via the JSONEngineBoxcar.
  • Security-First Data Access: SQL and ActiveRecord tools default to read-only mode to prevent accidental write operations.

Related

  • Project
  • Dispatch
  • Project
  • Project
  • Project