README.md in ruby-openai-swarm-0.1.0 vs README.md in ruby-openai-swarm-0.2.0
- old
+ new
@@ -1,9 +1,10 @@
![Swarm Logo](assets/logo-swarm.png)
# Ruby OpenAI Swarm
+[![Gem Version](https://img.shields.io/gem/v/ruby-openai-swarm.svg)](https://rubygems.org/gems/ruby-openai-swarm)
[![rspec](https://github.com/graysonchen/ruby-openai-swarm/actions/workflows/rspec.yml/badge.svg)](https://github.com/graysonchen/ruby-openai-swarm/actions)
A Ruby-based educational framework adapted from OpenAI’s [Swarm](https://github.com/openai/swarm), exploring ergonomic, lightweight multi-agent orchestration.
> The primary goal of Swarm is to showcase the handoff & routines patterns explored in the [Orchestrating Agents: Handoffs & Routines](https://cookbook.openai.com/examples/orchestrating_agents) cookbook. It is not meant as a standalone library, and is primarily for educational purposes.
@@ -109,15 +110,33 @@
:sender=>"Spanish Agent"}
```
# Examples
+Setting ACCESS_TOKEN for AI Providers in examples
+
+- For OpenRouter:
+
+ `OPEN_ROUTER_ACCESS_TOKEN=cxxxxx` or `export OPEN_ROUTER_ACCESS_TOKEN=cxxxxx`
+
+- For OpenAI:
+
+ `OPENAI_ACCESS_TOKEN=cxxxxx` or `export OPENAI_ACCESS_TOKEN=cxxxxx`
+
Check out `/examples` for inspiration! Learn more about each one in its README.
- [X] [`basic`](examples/basic): Simple examples of fundamentals like setup, function calling, handoffs, and context variables
+ - running: `ruby examples/basic/agent_handoff.rb`
+ - running: `ruby examples/basic/bare_minimum.rb`
+ - running: `ruby examples/basic/context_variables.rb`
+ - running: `ruby examples/basic/function_calling.rb`
+ - running: `ruby examples/basic/simple_loop_no_helpers.rb`
- [X] [`triage_agent`](examples/triage_agent): Simple example of setting up a basic triage step to hand off to the right agent
+ - running: `ruby examples/triage_agent/main.rb`
- [X] [`weather_agent`](examples/weather_agent): Simple example of function calling
-- [ ] [`airline`](examples/airline): A multi-agent setup for handling different customer service requests in an airline context.
+ - running: `ruby examples/weather_agent/agents.rb`
+- [X] [`airline`](examples/airline): A multi-agent setup for handling different customer service requests in an airline context.
+ - running: `DEBUG=1 ruby examples/airline/main.rb`
- [ ] [`support_bot`](examples/support_bot): A customer service bot which includes a user interface agent and a help center agent with several tools
- [ ] [`personal_shopper`](examples/personal_shopper): A personal shopping agent that can help with making sales and refunding orders
link: https://github.com/openai/swarm/tree/main?tab=readme-ov-file#examples