Skip to content

RobotLab

[!CAUTION] This gem is under active development. APIs and features may change without notice. See the CHANGELOG for details.

RobotLab
"Build robots. Solve problems."
RobotLab is a Ruby gem that enables you to build sophisticated AI applications using multiple specialized robots (LLM agents) that work together to accomplish complex tasks.

Each robot has its own system prompt, tools, and capabilities. Robots can be orchestrated through networks with customizable routing logic, share information through a hierarchical memory system, and connect to external tools via the Model Context Protocol (MCP).

Key Features

  • Multi-Robot Architecture


    Build applications with multiple specialized AI agents, each with unique capabilities and personalities.

    Learn more

  • Network Orchestration


    Connect robots in networks with flexible routing to handle complex, multi-step workflows.

    Creating Networks

  • Extensible Tools


    Give robots custom tools to interact with external systems, databases, and APIs.

    Using Tools

  • MCP Integration


    Connect to Model Context Protocol servers to extend robot capabilities with external tools.

    MCP Guide

  • Shared Memory


    Robots can share information through a hierarchical memory system with namespaced scopes.

    Memory System

  • Conversation History


    Persist and restore conversation threads for long-running interactions.

    History Guide

Quick Example

require "robot_lab"

# Configure RobotLab
RobotLab.configure do |config|
  config.anthropic_api_key = ENV["ANTHROPIC_API_KEY"]
  config.default_model = "claude-sonnet-4"
end

# Create a simple robot
robot = RobotLab.build do
  name "assistant"
  description "A helpful AI assistant"
  template <<~PROMPT
    You are a helpful assistant. Answer questions clearly and concisely.
  PROMPT
end

# Create a network with the robot
network = RobotLab.create_network do
  name "simple_network"
  add_robot robot
end

# Run the network
state = RobotLab.create_state(message: "What is the capital of France?")
result = network.run(state: state)

puts result.last_result.output.first.content
# => "The capital of France is Paris."

Supported LLM Providers

RobotLab supports multiple LLM providers through the ruby_llm library:

Provider Models
Anthropic Claude 4, Claude Sonnet, Claude Haiku
OpenAI GPT-4o, GPT-4, GPT-3.5 Turbo
Google Gemini Pro, Gemini Ultra
Azure OpenAI All Azure-hosted OpenAI models
Bedrock Claude models via AWS Bedrock
Ollama Local models via Ollama

Installation

Add RobotLab to your Gemfile:

gem "robot_lab"

Or install directly:

gem install robot_lab

Full Installation Guide

Next Steps

License

RobotLab is released under the MIT License.