Annotation EnableAgents
-
- All Implemented Interfaces:
-
java.lang.annotation.Annotation
@Retention(value = RetentionPolicy.RUNTIME)@Target(value = ElementType.TYPE)@Deprecated(since = "0.3.1", forRemoval = true) public @interface EnableAgents
Enables the Embabel Agent framework with auto-configuration support.
This annotation triggers the import of agent-related configuration classes and activates appropriate Spring profiles based on the specified attributes. It serves as the foundation for more specialized annotations like
@EnableAgentShelland@EnableAgentMcp.loggingTheme = "starwars", mcpServers = {"filesystem", "github"} ) public class MyAgentApplication { public static void main(String[] args) { SpringApplication.run(MyAgentApplication.class, args); } }This annotation activates Spring profiles based on the provided attributes:
loggingTheme- Activates a theme-specific profile (e.g., "starwars", "severance")localModels- Activates profiles for local AI model providersmcpServers- Activates profiles for Model Context Protocol
- Since:
0.1.0
Embabel Team
-
-
Method Summary
Modifier and Type Method Description abstract StringloggingTheme()Specifies the logging theme to use for agent operations. abstract Array<String>mcpServers()Specifies Model Context Protocol (MCP) clients to enable. -
-
Method Detail
-
loggingTheme
abstract String loggingTheme()
Specifies the logging theme to use for agent operations.
If set, this activates a corresponding Spring profile that customizes logging output with themed messages and formatting.
Supported themes:"starwars"- Star Wars themed logging messages"severance"- Corporate/Severance themed logging""(default) - Standard logging without theming
= LoggingThemes.STAR_WARS) // Outputs: "May the Force be with your agents!"- Returns:
the logging theme name, or empty string for default logging
-
mcpServers
abstract Array<String> mcpServers()
Specifies Model Context Protocol (MCP) clients to enable.
MCP clients allow agents to interact with external tools and data sources through the standardized Model Context Protocol. Each value activates a corresponding integration module.
Example:
Security Note:= {"filesystem", "github", "postgres"}) // Enables file system, GitHub, and PostgresSQL MCP clientsEach MCP server specified may require additional configuration and authentication. Ensure proper credentials are configured before enabling clients.
- Returns:
array of MCP server identifiers to enable and connect to
-
-
-
-