EnableAgentShell

Enables an interactive command-line shell interface for Embabel Agent applications.

This annotation configures your Spring Boot application to run in interactive shell mode, providing a REPL-like environment for testing, debugging, and interacting with your agents in real-time. It's the recommended way to develop and test agents before deploying them as services or MCP servers.

What This Provides:

  • Activates the "shell" Spring profile
  • Configures Spring Shell for interactive command-line interface
  • Auto-discovers and registers all @Agent annotated classes
  • Provides built-in commands for agent interaction and testing
  • Enables human-in-the-loop interactions and form handling
  • Sets up progress tracking and detailed logging capabilities

Example Usage:




public class AgentShellApplication {
    public static void main(String[] args) {
        SpringApplication.run(AgentShellApplication.class, args);
    }
}

Available Shell Commands:

  • help - Display all available commands
  • list - Show all registered agents
  • execute "<request>" [-p] [-r] - Run an agent with a request
    • -p - Log prompts sent to LLMs
    • -r - Log responses from LLMs
  • chat - Enter interactive chat mode with agents
  • clear - Clear the console screen
  • exit - Exit the application

Testing Agents:

The shell mode is ideal for:

  • Rapid prototyping of agent workflows
  • Testing prompt engineering and LLM interactions
  • Debugging agent action sequences
  • Demonstrating agent capabilities to stakeholders
  • Integration testing with real LLM providers

Tips for Effective Usage:

  • Use -p -r flags initially to understand agent behavior
  • Test edge cases interactively before writing unit tests
  • Use the chat command for multi-turn conversations
  • Export shell history for documentation or test cases

Since

1.0

Author

Embabel Team

See also

Functions

Link copied to clipboard
abstract fun annotationType(): Class<out Annotation>
Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
abstract fun toString(): String