Towards Declarative Composition of Heterogeneous AI Agents
Abstract
As AI systems increasingly evolve into ecosystems of specialized agents, composing heterogeneous AI technologies into coherent multi-agent applications has become a significant software engineering challenge. Existing agent composition frameworks primarily focus on large language models and conversational workflows, leaving classification, regression, and other AI services tightly coupled to framework- or provider-specific implementations. This limits portability, interoperability, and the consistent governance of heterogeneous agent ecosystems. We propose a declarative composition model in which AI agents are specified as portable, contract-governed artifacts independent of the underlying AI technology, model, or provider. The model separates agent declaration, dispatch, and execution, shifting integration concerns from imperative orchestration code to declarative specifications while enabling uniform runtime validation, governance, and provider-agnostic dispatch. We materialize the proposed model in a runtime architecture supporting agent registration, contract enforcement, Agent Level Agreements (ALAs), telemetry, and transparent model substitution. A reproducible feasibility study with real LLM-based code-smell analysis agents demonstrates that heterogeneous agent roles can share the same composition pipeline while preserving contracts, runtime policies, and portability across model configurations. Although evaluated using generative agents, the proposed model is designed as a software engineering foundation for composing and governing heterogeneous AI agent ecosystems.