Interactive Spring Shell-based command-line interface for the Embabel Agent platform, providing terminal interaction, chat sessions, and agent management commands.
Get started with Embabel Agent Shell in your Spring Boot application.
Add the dependency to your project:
Maven:
<dependency>
<groupId>com.embabel.agent</groupId>
<artifactId>embabel-agent-shell</artifactId>
<version>0.3.3</version>
</dependency>Gradle:
implementation("com.embabel.agent:embabel-agent-shell:0.3.3")Create a Spring Boot application:
import org.springframework.boot.autoconfigure.SpringBootApplication
import org.springframework.boot.runApplication
@SpringBootApplication
class MyAgentApplication
fun main(args: Array<String>) {
runApplication<MyAgentApplication>(*args)
}With the embabel-agent-shell dependency, your application automatically has an interactive shell with all commands available.
Configure in application.yaml:
embabel:
agent:
shell:
lineLength: 140
redirectLogToFile: false
logging:
personality: starwars # or severance, hitchhiker, colossus, montypythonStart your application and try these commands:
# List available agents
embabel> agents
# Execute a task
embabel> x "Find news about technology" -p
# Start a chat session
embabel> chat
# View help
embabel> helpMain components you'll use programmatically:
// Shell commands component
import com.embabel.agent.shell.ShellCommands
// Terminal interaction services
import com.embabel.agent.shell.TerminalServices
// Configuration
import com.embabel.agent.shell.config.ShellConfiguration
import com.embabel.agent.shell.config.ShellProperties
// Prompt providers
import com.embabel.agent.shell.DefaultPromptProvider
import com.embabel.agent.shell.MessageGeneratorPromptProvider
// Utility functions
import com.embabel.agent.shell.formatProcessOutput
import com.embabel.agent.shell.markdownToConsoletessl i tessl/maven-com-embabel-agent--embabel-agent-shell@0.3.0