Skip to content

[FEATURE] Load Agentic Configurations from a Dictionary #690

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

vawsgit
Copy link
Contributor

@vawsgit vawsgit commented Aug 19, 2025

Description

This PR implements the complete experimental config_loader system for dictionary-based agent configuration loading, addressing issue #606 with comprehensive functionality for programmatic agent management.

Core Implementation:

  • AgentConfigLoader: Complete implementation for loading agents from dictionary configurations with caching, serialization, and structured output support
  • ToolConfigLoader: Comprehensive tool loading system supporting string identifiers, Agent-as-Tool, Swarm-as-Tool, and Graph-as-Tool patterns
  • SwarmConfigLoader: Multi-agent swarm configuration loading with agent integration
  • GraphConfigLoader: Workflow graph configuration loading with condition support and GraphBuilder integration

Key Features Added:

  • Dictionary-based configuration: Full support for programmatic agent configuration using Python dictionaries
  • Multi-agent tool patterns: Agent-as-Tool, Swarm-as-Tool, and Graph-as-Tool implementations
  • Structured output configuration: Schema registry system with Pydantic model factory and validation
  • Configuration serialization: Bidirectional conversion between objects and dictionary configurations
  • Caching system: Performance optimization with configurable caching for all loaders
  • Tool loading strategies: Multiple resolution strategies for tools (decorated, module-based, multi-agent)

Advanced Capabilities:

  • Template substitution: Parameter substitution in agent-as-tool configurations using {variable} syntax
  • Schema management: Comprehensive schema registry with JSON Schema
  • Configuration validation: Input validation and error handling across all loaders

Configuration Support:

  • Agent configurations: Model, tools, system prompts, structured output, conversation management
  • Tool configurations: String identifiers, module paths, multi-agent configurations
  • Swarm configurations: Multi-agent coordination with handoff logic and agent specialization
  • Graph configurations: Workflow definitions with nodes, edges, conditions, and entry points

Testing & Quality:

  • Comprehensive test suite: tests covering all configuration scenarios and edge cases
  • Integration tests: End-to-end testing of multi-agent tool patterns

This implementation provides a complete solution for programmatic agent configuration management, enabling dynamic agent creation, complex multi-agent workflows, and configuration-driven development patterns.

Related Issues

Closes [FEATURE] Load Agentic Configurations from a Dictionary #606

Documentation PR

Samples PR

Type of Change

New feature - Complete experimental config_loader system implementation

Testing

How have you tested the change?

  • I ran hatch run prepare
  • All existing unit tests pass
  • Comprehensive config loader test suite
  • Error handling and validation testing

Checklist

  • I have read the CONTRIBUTING document
  • I have added any necessary tests that prove my fix is effective or my feature works
  • I have updated the documentation accordingly
  • I have added an appropriate example to the documentation to outline the feature, or no new docs are needed
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@vawsgit vawsgit changed the title [FEATURE] Load Agentic Configurations from a Dictionary [FEATURE] Load Agentic Configurations from a Dictionary (#606) Aug 19, 2025
@vawsgit vawsgit changed the title [FEATURE] Load Agentic Configurations from a Dictionary (#606) [FEATURE] Load Agentic Configurations from a Dictionary Aug 19, 2025
@vawsgit vawsgit marked this pull request as ready for review August 20, 2025 00:48
@vawsgit vawsgit force-pushed the feature/vincilb/config-loader branch from fee9a3f to 0791dc2 Compare August 20, 2025 01:57
@vawsgit vawsgit force-pushed the feature/vincilb/config-loader branch from 0791dc2 to 98e3364 Compare August 20, 2025 02:08
@vawsgit vawsgit force-pushed the feature/vincilb/config-loader branch from 447b54e to 9f333c1 Compare August 20, 2025 02:12
Clean up test directories by removing documentation files that are not needed for testing:
- tests/strands/experimental/config_loader/agent/ENHANCED_YAML_FORMAT.md
- tests/strands/experimental/config_loader/agent/README.md
- tests/strands/experimental/config_loader/tools/README.md

These files were development artifacts and are not required for the production ConfigLoader system.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Load Agentic Configurations from a Dictionary
1 participant