feat: add AgentManifest for declarative capability profiles#2270
Open
ImenGBY wants to merge 1 commit intostrands-agents:mainfrom
Open
feat: add AgentManifest for declarative capability profiles#2270ImenGBY wants to merge 1 commit intostrands-agents:mainfrom
ImenGBY wants to merge 1 commit intostrands-agents:mainfrom
Conversation
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.
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.
Summary
Add an optional
AgentManifestto theAgentclass that formally declares an agent's 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.Motivation
Today, a Strands agent is defined by its runtime configuration: model, tools, system prompt. There is no way to declare what an agent needs or what it produces without inspecting its code or documentation. This means every multi-agent deployment requires manual dependency tracking, custom wiring between agents, and runtime failures as the only signal that something is missing.
This PR adds a declarative manifest that solves three problems:
Changes
src/strands/agent/manifest.pywith AgentManifest, InputContract, OutputContract, Trigger dataclassessrc/strands/agent/agent.pyadded optional manifest parameter to Agent.initsrc/strands/agent/__init__.pyexports new classestests/strands/agent/test_manifest.pywith 24 unit tests (all passing)rfcs/0001-agent-manifest.mdwith full design rationale and usage examplesBackward Compatibility
Tests
24 unit tests covering creation, serialization, deserialization, file loading, roundtrip, and dependency satisfaction checking.