Class: A2A::Server::MultiAgent
- Inherits:
-
Object
- Object
- A2A::Server::MultiAgent
- Defined in:
- lib/simple_a2a/server/multi_agent.rb
Overview
Hosts multiple A2A agents on a single server, each at its own URL path.
Usage:
A2A.multi_server(
agents: {
"/anthropic" => { agent_card: card1, executor: exec1 },
"/openai" => { agent_card: card2, executor: exec2 }
},
port: 9292
).run
Instance Method Summary collapse
-
#initialize(agents:, host: "localhost", port: 9292) ⇒ MultiAgent
constructor
A new instance of MultiAgent.
- #run ⇒ Object
Constructor Details
#initialize(agents:, host: "localhost", port: 9292) ⇒ MultiAgent
Returns a new instance of MultiAgent.
18 19 20 21 22 |
# File 'lib/simple_a2a/server/multi_agent.rb', line 18 def initialize(agents:, host: "localhost", port: 9292) @agents = agents @host = host @port = port end |
Instance Method Details
#run ⇒ Object
24 25 26 |
# File 'lib/simple_a2a/server/multi_agent.rb', line 24 def run FalconRunner.new(rack_app, host: @host, port: @port).run end |