Files
cleveragents-core/tests/features/agent_network.feature
T

40 lines
1.6 KiB
Gherkin

Feature: AgentNetwork functionality
Scenario: Initialize AgentNetwork without configuration
Given I create an AgentNetwork without configuration files
Then the AgentNetwork should have a ConfigurationManager
And the AgentNetwork's agent factory should be None
And the AgentNetwork's router should be None
Scenario: Initialize AgentNetwork with configuration
Given a configuration file named "config.yaml" with content:
"""
version: "1.0"
agents:
- name: agent1
type: llm
config:
provider: openai
model: gpt-3.5-turbo
"""
When I create an AgentNetwork with the configuration file "config.yaml"
Then the configuration should be loaded and validated
Scenario: Process a message with an initialized router
Given an AgentNetwork
And the AgentNetwork has a mock router that responds based on input
When I process the message "hello" with the AgentNetwork
Then the router's process_message method should be called with "hello"
And the response should be "mock response to hello"
Scenario: Attempt to process a message without an initialized router
Given an AgentNetwork
When I try to process a message with the AgentNetwork
Then an AssertionError should be raised with message "Router not initialized. Load configuration first."
Scenario: Get the router from the AgentNetwork
Given an AgentNetwork
And the AgentNetwork has a mock router
When I get the router from the AgentNetwork
Then the returned router should be the mock router