Spring Boot auto-configuration platform for Embabel Agent Framework, enabling annotation-driven profile activation and bootstrapping of agent configurations with MCP client support
Configure themed logging for agent operations.
embabel.agent.logging.personality=starwarsTheme: Star Wars universe Example messages: "May the Force be with your agents!"
embabel.agent.logging.personality=severanceTheme: Severance TV show Reference: IMDB Catchphrase: "Praise Kier!"
embabel.agent.logging.personality=colossusTheme: Colossus: The Forbin Project Reference: IMDB Catchphrase: "Action will be taken!"
embabel.agent.logging.personality=hitchhikerTheme: Hitchhiker's Guide to the Galaxy Reference: Douglas Adams' classic work
embabel.agent.logging.personality=montypythonTheme: Monty Python Reference: Monty Python comedy troupe
embabel.agent.logging.personality=Standard logging without theming.
# application.properties
embabel.agent.logging.personality=starwars# application.yml
embabel:
agent:
logging:
personality: starwarsexport EMBABEL_AGENT_LOGGING_PERSONALITY=starwars
java -jar app.jarjava -jar app.jar --embabel.agent.logging.personality=starwarsimport org.springframework.boot.SpringApplication;
import com.embabel.agent.config.annotation.LoggingThemes;
public class MyApp {
public static void main(String[] args) {
SpringApplication app = new SpringApplication(MyApp.class);
app.setDefaultProperties(Map.of(
"embabel.agent.logging.personality", LoggingThemes.STAR_WARS
));
app.run(args);
}
}# application.yml
spring:
profiles:
active: dev
---
# Development - fun theme
spring:
config:
activate:
on-profile: dev
embabel:
agent:
logging:
personality: starwars
---
# Production - no theme
spring:
config:
activate:
on-profile: prod
embabel:
agent:
logging:
personality: ""import com.embabel.agent.config.annotation.LoggingThemes;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;
@Component
public class ThemeAwareComponent {
@Value("${embabel.agent.logging.personality:}")
private String loggingTheme;
public boolean isStarWarsTheme() {
return LoggingThemes.STAR_WARS.equals(loggingTheme);
}
public boolean isSeveranceTheme() {
return LoggingThemes.SEVERANCE.equals(loggingTheme);
}
public boolean isColossuTheme() {
return LoggingThemes.COLOSSUS.equals(loggingTheme);
}
public boolean isHitchhikerTheme() {
return LoggingThemes.HITCHHIKERS_GUIDE.equals(loggingTheme);
}
public boolean isMontyPythonTheme() {
return LoggingThemes.MONTYPYTHON.equals(loggingTheme);
}
}import com.embabel.agent.config.annotation.LoggingPersonalityProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Component;
@Component
@EnableConfigurationProperties(LoggingPersonalityProperties.class)
public class LoggingConfig {
private final LoggingPersonalityProperties props;
public LoggingConfig(LoggingPersonalityProperties props) {
this.props = props;
}
public String getTheme() {
return props.personality();
}
}import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
@ConditionalOnProperty(
name = "embabel.agent.logging.personality",
havingValue = "starwars"
)
public class StarWarsLoggingConfig {
@Bean
public LoggingCustomizer starWarsCustomizer() {
return new StarWarsLoggingCustomizer();
}
}# src/test/resources/application-test.properties
embabel.agent.logging.personality=import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.TestPropertySource;
@SpringBootTest
@TestPropertySource(properties = {
"embabel.agent.logging.personality=starwars"
})
public class ThemeTest {
// Tests with Star Wars theme
}Old approach (deprecated):
import com.embabel.agent.config.annotation.EnableAgents;
import com.embabel.agent.config.annotation.LoggingThemes;
@SpringBootApplication
@EnableAgents(loggingTheme = LoggingThemes.STAR_WARS)
public class OldApp { }New approach (recommended):
@SpringBootApplication
public class NewApp { }embabel.agent.logging.personality=starwarsSpring Boot configuration metadata provides IDE support:
IntelliJ IDEA / VS Code / Eclipse:
embabel.agent.logging.personality= and press Ctrl+SpaceCheck:
embabel.agent.logging.personalityDebug:
java -jar app.jar --logging.level.com.embabel.agent=DEBUGProblem: Property set to invalid theme value.
Solution: Use one of the supported values:
starwarsseverancecolossushitchhikermontypythonCheck injection:
// Use default value
@Value("${embabel.agent.logging.personality:}")
private String theme;
// Check for null/empty
if (theme != null && !theme.isEmpty()) {
// Use theme
}On Windows, UTF-8 console is automatically configured for proper display of themed messages with Unicode characters.
Automatic behavior:
EnvironmentPostProcessor initializationDevelopment: Use fun themes for morale
# application-dev.yml
embabel:
agent:
logging:
personality: starwarsProduction: Use standard logging
# application-prod.yml
embabel:
agent:
logging:
personality: ""Agree on theme usage within team:
Themed logging has negligible performance impact. Safe to use in all environments if desired.
Install with Tessl CLI
npx tessl i tessl/maven-com-embabel-agent--embabel-agent-platform-autoconfigure