0.0
No release in over 3 years
Exposes RobotLab robots and networks as A2A agents over HTTP+SSE. Implements the Agent2Agent Protocol v1.0 (Linux Foundation) via the simple_a2a gem. Supports sync and interactive execution modes, bridging RobotLab's AskUser tool to A2A's input_required/resume lifecycle for multi-turn flows without a terminal dependency.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

 Project Readme

robot_lab-a2a

robot_lab-a2a exposes RobotLab robots and networks as Agent2Agent (A2A) protocol agents over HTTP and Server-Sent Events. It bridges RobotLab's terminal-based AskUser tool to A2A's input_required/resume lifecycle, enabling multi-turn conversational flows without any terminal dependency. HTTP serving is delegated to the simple_a2a gem.

Installation

bundle add robot_lab-a2a

Or add to your Gemfile manually:

gem "robot_lab-a2a"

Quick Start

Sync robot (no user input)

require "robot_lab/a2a"

robot = MyRobot.new  # any RobotLab::Robot subclass

RobotLab::A2A::Server.new(port: 9292)
  .add_robot(robot, name: "My Robot", description: "Does something useful")
  .run

Interactive robot (multi-turn via AskUserTool)

require "robot_lab/a2a"

robot = MyInteractiveRobot.new

RobotLab::A2A::Server.new(interactive: :a2a_tool, port: 9292)
  .add_robot(robot, name: "Interactive Robot", description: "Asks clarifying questions")
  .run

Network pipeline

require "robot_lab/a2a"

network = MyPipeline.new

RobotLab::A2A::Server.new(port: 9292)
  .add_network(network, name: "Pipeline", description: "Multi-stage pipeline")
  .run

Running the Examples

From the repo root:

bundle exec ruby examples/run 01_sync_robot
bundle exec ruby examples/run 02_interactive_a2a_tool
bundle exec ruby examples/run 03_robot_network

Or from inside the examples/ directory:

./run 01_sync_robot

Each example starts its own server. Use a second terminal or curl to interact with it. See docs/examples.md for expected output and two-turn client patterns.

Documentation

Full documentation lives in docs/:

Development

bin/setup        # install dependencies
rake test        # run the full test suite
rake quality     # static analysis (if configured)
rake build       # build the gem package

Run a single test file:

ruby -Ilib -Itest test/robot_lab/a2a_test.rb

Run a single test by name:

ruby -Ilib -Itest test/robot_lab/registry_test.rb -n test_size_is_zero_when_empty

License

MIT