CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/maven-com-embabel-agent--embabel-agent-platform-autoconfigure

Spring Boot auto-configuration platform for Embabel Agent Framework, enabling annotation-driven profile activation and bootstrapping of agent configurations with MCP client support

Overview
Eval results
Files

logging-themes.mddocs/guides/

Logging Themes Guide

Configure themed logging for agent operations.

Available Themes

Star Wars

embabel.agent.logging.personality=starwars

Theme: Star Wars universe Example messages: "May the Force be with your agents!"

Severance

embabel.agent.logging.personality=severance

Theme: Severance TV show Reference: IMDB Catchphrase: "Praise Kier!"

Colossus

embabel.agent.logging.personality=colossus

Theme: Colossus: The Forbin Project Reference: IMDB Catchphrase: "Action will be taken!"

Hitchhiker's Guide

embabel.agent.logging.personality=hitchhiker

Theme: Hitchhiker's Guide to the Galaxy Reference: Douglas Adams' classic work

Monty Python

embabel.agent.logging.personality=montypython

Theme: Monty Python Reference: Monty Python comedy troupe

No Theme (Default)

embabel.agent.logging.personality=

Standard logging without theming.

Configuration Methods

Properties File

# application.properties
embabel.agent.logging.personality=starwars

YAML

# application.yml
embabel:
  agent:
    logging:
      personality: starwars

Environment Variable

export EMBABEL_AGENT_LOGGING_PERSONALITY=starwars
java -jar app.jar

Command-Line Argument

java -jar app.jar --embabel.agent.logging.personality=starwars

Programmatic

import 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);
    }
}

Profile-Specific Themes

# 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: ""

Using Theme Constants

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);
    }
}

Injecting Logging Properties

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();
    }
}

Conditional Bean Registration

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();
    }
}

Testing with Themes

Disable Theme in Tests

# src/test/resources/application-test.properties
embabel.agent.logging.personality=

Test-Specific Theme

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
}

Deprecated: @EnableAgents Annotation

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=starwars

IDE Auto-Completion

Spring Boot configuration metadata provides IDE support:

IntelliJ IDEA / VS Code / Eclipse:

  • Type embabel.agent.logging.personality= and press Ctrl+Space
  • IDE shows available theme values with descriptions

Troubleshooting

Theme Not Applied

Check:

  1. Property name spelling: embabel.agent.logging.personality
  2. Property value matches available themes
  3. No higher-priority property source overriding value

Debug:

java -jar app.jar --logging.level.com.embabel.agent=DEBUG

Unknown Theme Value

Problem: Property set to invalid theme value.

Solution: Use one of the supported values:

  • starwars
  • severance
  • colossus
  • hitchhiker
  • montypython
  • `` (empty for no theme)

Property Not Found in Code

Check injection:

// Use default value
@Value("${embabel.agent.logging.personality:}")
private String theme;

// Check for null/empty
if (theme != null && !theme.isEmpty()) {
    // Use theme
}

Windows Console Configuration

On Windows, UTF-8 console is automatically configured for proper display of themed messages with Unicode characters.

Automatic behavior:

  • Console code page set to UTF-8 (chcp 65001)
  • Optimal font configured for Unicode display
  • Applied during EnvironmentPostProcessor initialization

Best Practices

Development vs Production

Development: Use fun themes for morale

# application-dev.yml
embabel:
  agent:
    logging:
      personality: starwars

Production: Use standard logging

# application-prod.yml
embabel:
  agent:
    logging:
      personality: ""

Team Consistency

Agree on theme usage within team:

  • Disable in production
  • Optional in development
  • Always disabled in CI/CD logs

Performance Consideration

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

docs

index.md

SCORING.md

tile.json