Annotation AgentPlatform
-
- All Implemented Interfaces:
-
java.lang.annotation.Annotation
@Retention(value = RetentionPolicy.RUNTIME)@Target(value = ElementType.TYPE)@Deprecated(since = "0.1.3", forRemoval = true) public @interface AgentPlatform
Core meta-annotation that enables the Embabel Agent platform infrastructure.
This annotation serves as the foundation for all agent-specific annotations in the Embabel framework. It bootstraps the agent platform by importing necessary auto-configuration, scanning for components, and activating platform-specific Spring profiles.
This is a meta-annotation designed to be used on other annotations rather than directly on application classes. It provides the common configuration needed by all agent platform variants (Shell, MCP Server, Bedrock, etc.).
- Imports Auto-Configuration: Loads AgentPlatformAutoConfiguration which sets up core agent infrastructure
- Scans Configuration Properties: Discovers all
@ConfigurationPropertiesclasses in thecom.embabel.agentpackage - Component Scanning: Registers all Spring components in the
com.embabel.agent.autoconfigurepackage - Profile Activation: Activates Spring profiles based on the
valueattribute (e.g., "shell", "mcp-server", "bedrock")
// Creating a custom agent annotation public @interface EnableMyAgentPlatform { }
) public class CustomAgentApplication { } }// Only for advanced customization "custom-profile-2"The
valueattribute specifies which Spring profiles to activate:"default"- Basic agent platform without specific features"shell"- Interactive command-line interface mode"mcp-server"- Model Context Protocol server mode"bedrock"- AWS Bedrock integration mode"a2a-server"- Agent-to-Agent communication server
This annotation ensures the following are discovered and registered:
- All
@Agentannotated classes - Custom
@Toolimplementations - Agent
@Repositoryinterfaces - Configuration properties for agent behavior
- Auto-configuration classes for platform features
This annotation is used as a building block by:
- EnableAgentShell - Adds
@AgentPlatform("shell") - EnableAgentMcpServer - Adds
@AgentPlatform("mcp-server") - EnableAgentBedrock - Adds
@AgentPlatform("shell, bedrock") - EnableAgents - Adds
@AgentPlatformwith default value
When multiple
@AgentPlatformannotations are present (through meta-annotations), their profiles are merged. For example:// Contributes "shell" // Contributes "shell, bedrock" // Result: Profiles "shell" and "bedrock" are both activeThe actual profile activation is handled by EnvironmentPostProcessor which processes this annotation during the Spring Boot startup sequence.
- Since:
1.0
Embabel Team
-
-
Method Summary
-
-
Method Detail
-
value
abstract Array<String> value()
Specifies the platform profiles to activate.
Each value in this array will be registered as an active Spring profile, enabling platform-specific configurations and beans.
Common Values:"shell"- Interactive CLI mode"mcp-server"- MCP protocol server"bedrock"- AWS Bedrock integration
Multiple profiles can be specified to combine features:
) }"metrics", "observability"- Returns:
array of profile names to activate
-
-
-
-