-
Notifications
You must be signed in to change notification settings - Fork 245
Framework Development
This section contains documentation for developers working on the Embabel Agent Framework itself, including architecture decisions, implementation plans, and migration guides.
- ITERATIVE_PLAN.md - Comprehensive implementation plan for personality plugin infrastructure transformation
- PROFILES_MIGRATION_GUIDE.md - Migration guide from profile-based to property-based configuration
The framework follows an incremental transformation approach:
- Property Foundation ✅ - Unified configuration system
- Hybrid Migration ✅ - Backward compatibility during transition
- Plugin Architecture 🔄 - Personality and model provider plugins
- Profile Deprecation 📋 - Clean removal of legacy patterns
Moving from Spring profiles to property-based activation provides:
- Library-centric design - No profile dependencies
- Environment flexibility - Easy override with environment variables
- IDE support - Auto-completion and validation
- Better testing - Cleaner test configuration
Transforming core systems into plugin architectures enables:
- Runtime extensibility - Add capabilities without code changes
- Dynamic discovery - Automatic registration of providers
- Clean separation - Platform vs application concerns
- Federation support - Multi-agent system coordination
The framework maintains 100% backward compatibility during transitions:
// OLD: Profile-based (still works)
@Profile("starwars")
@Component
class StarWarsLogging
// NEW: Property-based (preferred)
@ConditionalOnProperty("embabel.agent.logging.personality", havingValue = "starwars")
@Component
class StarWarsLoggingCritical systems support both old and new approaches simultaneously:
@Configuration
class HybridConfiguration {
// NEW: Primary approach
@Bean
@Primary
@ConditionalOnProperty("embabel.agent.infrastructure.neo4j.enabled")
fun propertyBasedNeo4j(): Neo4jConfig
// OLD: Fallback for compatibility
@Bean
@Profile("neo")
@ConditionalOnMissingBean
fun profileBasedNeo4j(): Neo4jConfig
}- Property segregation - Clear separation between platform and application config
- Migration detection - Automatic scanning for deprecated usage
- Unified properties - Single source of truth for platform configuration
- Hybrid adapter pattern - Legacy classes become adapters
- Constructor injection - Clean dependency management
- Test infrastructure - Comprehensive testing patterns
Transform the personality system into a modern plugin architecture:
// Target: Plugin-based personality system
interface PersonalityProvider {
val name: String
val description: String
fun createEventListener(): LoggingAgenticEventListener
}
@Component
class PersonalityRegistry(
private val providers: List<PersonalityProvider>
) {
fun switchPersonality(name: String): Boolean
fun getAvailablePersonalities(): Set<String>
}- Property-Based Configuration - Replace profile activation
- Plugin Infrastructure - Registry and provider interfaces
- Provider Wrappers - Convert existing personalities
- Runtime Management - Dynamic switching capabilities
- Enhanced Properties - External configuration support
Apply plugin patterns to model providers:
- Dynamic model discovery
- Runtime provider switching
- Cost-aware model selection
- Performance-based routing
Enable multi-agent coordination:
- Remote agent discovery
- Cross-platform communication
- Distributed goal achievement
- Resource sharing protocols
Internal framework behavior:
@ConfigurationProperties("embabel.agent.platform")
data class AgentPlatformProperties(
val scanning: ScanningConfig,
val autonomy: AutonomyConfig,
val models: ModelsConfig
)Business logic and deployment:
@ConfigurationProperties("embabel.agent.logging")
data class PersonalityConfiguration(
var personality: String = "default",
var verbosity: String = "info"
)@Configuration
@ConditionalOnProperty("embabel.agent.infrastructure.neo4j.enabled")
@ConditionalOnClass(Neo4jRepository::class)
class Neo4jAutoConfiguration@Configuration
class ModelProviderAutoConfiguration {
@Bean
@ConditionalOnBean(OllamaApi::class)
fun ollamaModelProvider(): ModelProvider = OllamaModelProvider()
}@Test
fun `should support both legacy and new configuration`() {
// Test dual support during migration
assertThat(legacyConfig).isNotNull()
assertThat(newConfig).isNotNull()
assertThat(newConfig.getValue()).isEqualTo(legacyConfig.getValue())
}@SpringBootTest
@TestPropertySource(properties = [
"embabel.agent.platform.test.mockMode=true"
])
class AutoConfigurationTest {
@Autowired
private lateinit var agentPlatform: AgentPlatform
@Test
fun `should auto-configure platform correctly`()
}- Understand the Architecture - Read existing implementation plans
- Follow Patterns - Use established configuration and testing patterns
- Maintain Compatibility - Never break existing APIs during transitions
- Test Comprehensively - Both unit and integration tests required
# Platform internals
embabel.agent.platform.scanning.enabled=true
# Application configuration
embabel.agent.logging.personality=starwars
# Infrastructure integration
embabel.agent.infrastructure.neo4j.enabled=true// MIGRATED: @ConfigurationProperties("embabel.autonomy") → AgentPlatformProperties.autonomy
@Component
class AutonomyProperties(platformProperties: AgentPlatformProperties) {
val goalConfidenceCutOff = platformProperties.autonomy.goalConfidenceCutOff
}@ConfigurationProperties("embabel.agent.logging")
@Validated
data class PersonalityConfiguration(
@field:Pattern(regexp = "^(default|starwars|severance)$")
var personality: String = "default"
)- Unit tests for individual configuration classes
- Integration tests for auto-configuration behavior
- Migration tests for backward compatibility
- End-to-end tests for complete scenarios
- Implementation plans for major changes
- Migration guides for breaking changes
- Code examples for new patterns
- Architecture decisions recorded in markdown
- ✅ Zero breaking changes during migration periods
- ✅ Complete test coverage for all new patterns
- ✅ Performance maintained or improved
- ✅ Memory usage optimized
- ✅ Intuitive configuration with clear property names
- ✅ IDE support with auto-completion and validation
- ✅ Clear error messages when configuration is invalid
- ✅ Comprehensive documentation with examples
- ✅ Clean separation between platform and application concerns
- ✅ Plugin extensibility without framework modifications
- ✅ Federation readiness for multi-agent systems
- ✅ Cloud-native deployment support
This framework development documentation ensures that contributors understand both the current state and the evolution path of the Embabel Agent Framework, enabling consistent and high-quality contributions to the platform.
(c) Embabel Software Inc 2024-2025.