Interactive Spring Shell-based command-line interface for the Embabel Agent platform, providing terminal interaction, chat sessions, and agent management commands.
Common issues and solutions when using Embabel Agent Shell.
Problem: Maven/Gradle cannot find embabel-agent-shell dependency
Solutions:
Verify repository is configured:
<repositories>
<repository>
<id>embabel-repo</id>
<url>https://your-embabel-repo-url</url>
</repository>
</repositories>Check version number is correct: 0.3.3
Clear local repository cache:
# Maven
mvn dependency:purge-local-repository
# Gradle
./gradlew clean build --refresh-dependenciesProblem: NoClassDefFoundError for Spring Shell or Embabel classes
Solutions:
<dependency>
<groupId>org.springframework.shell</groupId>
<artifactId>spring-shell-starter</artifactId>
</dependency>Problem: Application starts but shell is not interactive
Solutions:
Verify Spring Shell is enabled:
spring:
shell:
interactive:
enabled: trueCheck application is not running in non-interactive mode
Ensure terminal supports interactive input
Review startup logs for errors
Problem: Configuration properties in application.yaml not taking effect
Solutions:
Check property prefix is correct: embabel.agent.shell
Verify YAML indentation:
embabel:
agent:
shell:
lineLength: 140 # Correct indentationCheck for typos in property names
Ensure @EnableConfigurationProperties is present on configuration class
Try properties file format:
embabel.agent.shell.lineLength=140Problem: Configured personality prompt provider not appearing
Solutions:
Check property value matches exactly:
embabel:
agent:
logging:
personality: starwars # Must match exactly (lowercase)Verify message file exists in resources:
src/main/resources/logging/starwars.txtCheck component scanning includes personality packages
Review startup logs for conditional bean registration messages
Ensure no other PromptProvider bean conflicts
Problem: Shell command returns "Command not found"
Solutions:
Use help command to list available commands
Check command spelling and aliases:
execute → x
blackboard → bbVerify ShellCommands component is loaded
Check component scanning configuration
Problem: chat command not found
Solutions:
Verify Chatbot bean is registered:
@Bean
fun chatbot(): Chatbot { ... }Check @Autowired(required = false) parameter
Ensure chatbot implementation is on classpath
Review application context logs for chatbot bean creation
Problem: Error when using -s flag in execute or setOptions
Solutions:
This is a known issue - -s conflicts between --state and --showPlanning
Use long form flags:
# Instead of: x "task" -s
x "task" --state
x "task" --showPlanning falseCannot use both short -s flags together
Problem: "No goal found for intent: {intent}"
Solutions:
Rephrase intent more clearly
Use goals command to see available goals
Use chooseGoal to test goal selection:
chooseGoal "your intent here"Check agent platform has goals registered
Try open mode: x "intent" -o
Problem: "Goal not approved by user"
Solutions:
This occurs when you type 'n' at approval prompt
To approve goal, type 'y' when prompted:
Do you approve this goal: {description}? (y/n): yReview goal description before approving
Check if goal selection is correct with chooseGoal first
Problem: ProcessExecutionStuckException
Solutions:
Enable debug mode to see where it's stuck:
x "intent" -dCheck if process is waiting for user input
Review agent logs for blocking operations
Try with operation delays to inspect:
x "intent" --operationDelayCheck if required tools are available
Problem: ProcessWaitingException thrown
Solutions:
This indicates process needs user input
Check for awaitable requests (forms, confirmations)
Ensure terminal services is properly handling awaitables
Review agent output for prompts
Problem: Long lines not wrapping in terminal
Solutions:
Check line length configuration:
embabel:
agent:
shell:
lineLength: 140Verify ShellProperties is injected correctly
Try different line length values
Problem: Markdown displayed as plain text with symbols
Solutions:
Check if content contains "#" marker for auto-detection
Call markdownToConsole explicitly:
val styled = markdownToConsole(content)Verify terminal supports ANSI escape codes
Problem: ANSI escape codes like \u001B[31m visible in output
Solutions:
Check terminal supports ANSI codes:
echo -e "\u001B[31mRed Text\u001B[0m"Try different terminal emulator (iTerm2, Windows Terminal, etc.)
Check TERM environment variable:
echo $TERM # Should be xterm-256color or similarUpdate terminal emulator to latest version
Problem: No color in terminal output
Solutions:
Verify terminal supports colors
Check color palette is properly injected
Try different personality:
embabel:
agent:
logging:
personality: starwarsTest with simple ANSI output
Problem: Log output mixing with chat messages
Solutions:
Enable log redirection:
embabel:
agent:
shell:
redirectLogToFile: trueManually redirect logs:
val restore = terminalServices.redirectLoggingToFile("chat", workDir)
try {
terminalServices.chat(session)
} finally {
restore()
}Adjust logging levels:
logging:
level:
com.embabel: WARNProblem: Chat becomes unresponsive
Solutions:
Check for blocking operations in chat session
Verify LLM service is responding
Enable debug logging:
logging:
level:
com.embabel.agent: DEBUGTry Ctrl+C to force exit
Check network connectivity to LLM service
Problem: Typing "exit" doesn't end chat session
Solutions:
Try uppercase: EXIT
Check for extra spaces: exit (not exit )
Use Ctrl+C to force exit
Review chat session exit logic
Check if custom chatbot overrides exit handling
Problem: FormBindingRequest not showing form
Solutions:
Verify TerminalServices is handling awaitable
Check form has supported controls (TextField, Button)
Review agent output channel
Enable debug mode to see awaitable handling
Problem: Form submission rejected with validation errors
Solutions:
Check field requirements:
Review validation messages:
TextField(
name = "email",
required = true,
validationPattern = ".*@.*",
validationMessage = "Invalid email format"
)Try without validation to isolate issue
Problem: Form returns null response
Solutions:
This occurs when user types 'n' at submission prompt:
Submit form? (y/n): nTo submit, type 'y'
Check if agent handles null response:
val response = terminalServices.handleAwaitable(awaitable)
if (response == null) {
// Handle cancellation
}Problem: BeanCurrentlyInCreationException with shell components
Solutions:
Use constructor injection, not field injection
Check for circular references in dependencies
Use @Lazy annotation if necessary:
@Component
class MyService(
@Lazy private val shellCommands: ShellCommands
)Restructure component relationships
Problem: NoSuchBeanDefinitionException for shell components
Solutions:
Verify component scanning includes embabel packages:
@SpringBootApplication
@ComponentScan(basePackages = ["com.embabel.agent", "your.package"])
class ApplicationCheck if conditional beans match conditions
Review auto-configuration imports
Add explicit bean definitions if needed
Problem: Application takes long time to start
Solutions:
Check for expensive operations in bean initialization
Review auto-configuration logs
Use lazy initialization:
spring:
main:
lazy-initialization: trueProfile startup with actuator
Problem: Application uses excessive memory
Solutions:
Check for memory leaks in custom components
Review blackboard size and cleanup
Monitor with JVM tools:
jmap -heap <pid>Adjust JVM memory settings:
java -Xmx512m -Xms256m -jar app.jarProblem: Commands take long time to execute
Solutions:
Enable debug mode to identify bottlenecks:
x "task" -dCheck LLM service latency
Review tool execution times:
toolStatsOptimize agent configurations
Problem: redirectLogToFile not working
Solutions:
Verify directory exists and is writable
Check file permissions
Review logback configuration
Try manual redirection:
val restore = terminalServices.redirectLoggingToFile("test", ".")
// ... work
restore()Check for logback.xml conflicts
Problem: Custom log pattern not working
Solutions:
The redirectLoggingToFile uses fixed pattern:
%d{HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%nTo customize, modify logback configuration
Or implement custom logging redirection
Problem: Shell not working correctly on Windows
Solutions:
Use Windows Terminal instead of CMD
Enable ANSI support:
reg add HKCU\Console /v VirtualTerminalLevel /t REG_DWORD /d 1Check PowerShell version
Try Git Bash or WSL
Problem: Terminal features not working on macOS
Solutions:
Use iTerm2 for better ANSI support
Check Terminal.app preferences
Verify JLine native libraries
Update macOS if needed
Problem: Terminal features not working on Linux
Solutions:
Verify TERM environment variable
Check ncurses libraries installed
Try different terminal emulator
Review JLine native support
If issues persist:
Check Documentation:
Enable Debug Logging:
logging:
level:
com.embabel.agent: DEBUGReview Stack Traces:
Test in Isolation:
Check Dependencies:
Community Support:
tessl i tessl/maven-com-embabel-agent--embabel-agent-shell@0.3.0