Files
cleveragents-core/features/base_agent_module.feature
T

50 lines
2.5 KiB
Gherkin

Feature: CleverAgents base module coverage
To increase coverage on cleveragents.agents.base
We exercise the BaseAgent defaults and workflow helpers
Background:
Given the cleveragents base agent module is loaded with stub dependencies
Scenario: Instantiating a base agent test double builds default components
Given I instantiate a base agent test double with defaults
Then the fake list LLM should be constructed once
And the memory saver should be constructed once
And the compiled graph should receive the created memory saver
And the agent should expose a compiled application
Scenario: Base implementation of _build_graph raises a descriptive error
When I call the base agent _build_graph implementation
Then a NotImplementedError should mention subclasses must implement the graph
Scenario: Invoke applies default config when no config is provided
Given I instantiate a base agent test double with defaults
When I invoke the test agent with message "hello" and no config
Then the underlying invoke config should use thread_id "default"
And the invoke result should include message "hello"
Scenario: Invoke preserves an explicit config dictionary
Given I instantiate a base agent test double with defaults
When I invoke the test agent with message "custom" and config thread_id "thread-42"
Then the underlying invoke config should use thread_id "thread-42"
Scenario: Async invoke applies default config by default
Given I instantiate a base agent test double with defaults
When I asynchronously invoke the test agent with message "async-one" and no config
Then the async invocation config should use thread_id "default"
And the async result should include message "async-one"
Scenario: Async invoke honors an explicit config
Given I instantiate a base agent test double with defaults
When I asynchronously invoke the test agent with message "async-two" and config thread_id "async-99"
Then the async invocation config should use thread_id "async-99"
Scenario: Stream uses default config when omitted
Given I instantiate a base agent test double with defaults
When I stream the test agent with message "stream-one" and no config
Then the stream events should include thread_id "default"
Scenario: Stream honors a provided config
Given I instantiate a base agent test double with defaults
When I stream the test agent with message "stream-two" and config thread_id "stream-7"
Then the stream events should include thread_id "stream-7"