RFC 0002: Agent Composition — Declarative Multi-Agent Coordination#2273
Open
ImenGBY wants to merge 3 commits intostrands-agents:mainfrom
Open
RFC 0002: Agent Composition — Declarative Multi-Agent Coordination#2273ImenGBY wants to merge 3 commits intostrands-agents:mainfrom
ImenGBY wants to merge 3 commits intostrands-agents:mainfrom
Conversation
added 2 commits
May 10, 2026 00:27
Add optional AgentManifest to the Agent class that formally declares input requirements, output types, trigger conditions, and tool capabilities. This enables platforms to manage agent lifecycle, resolve dependencies automatically, and compose agents into chains without custom wiring. New files: - src/strands/agent/manifest.py: AgentManifest, InputContract, OutputContract, Trigger dataclasses with serialization support - tests/strands/agent/test_manifest.py: 24 unit tests - rfcs/0001-agent-manifest.md: Design rationale and usage examples Modified files: - src/strands/agent/agent.py: Added manifest parameter to Agent.__init__ - src/strands/agent/__init__.py: Export new classes The manifest is purely declarative metadata. It does not change agent execution behavior and has zero impact on prompt caching. Existing agents without manifests work exactly as before.
Implements the composition engine proposed in RFC 0002: - CompositionRegistry: local catalog of agents and manifests - BindingResolver: evaluates full dependency surface, reports gaps - EventRouter: derives event flow graph from declarations - LifecycleManager: reactive dormant/active transitions All 31 tests passing. Pure Python, no external dependencies.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
RFC 0002: Agent Composition — Declarative Multi-Agent Coordination
What
Proposes a
strands.compositionmodule that resolves agent dependencies and computes coordination from manifest declarations (RFC 0001). Given agents with manifests and a set of available resources, the module determines which agents can activate, which are blocked, what's missing, and how they connect.Why
RFC 0001 gave agents the ability to declare inputs and outputs. But declarations alone don't compose agents — developers still manually check dependencies, wire routing, and manage lifecycle. This RFC adds the resolution engine that makes manifests actionable:
How it relates to existing patterns
This is a third multi-agent pattern alongside Graph and Swarm:
These are complementary, not competing.
Key design decisions
AgentManifest.satisfies()from RFC 0001Open question
If this is considered too opinionated for core, happy to maintain it as a standalone package under
strands-agents/compositionwith no changes to the implementation.Dependencies