Skip to content

Getting Embabel Running

The quickest way to get started with Embabel is to run the examples:

Terminal window
# Clone and run examples
git clone https://github.com/embabel/embabel-agent-examples
cd embabel-agent-examples/scripts/java
./shell.sh
  • Java 21+
  • API Key from OpenAI, Anthropic, or Google
  • Maven 3.9+ (optional)

Set your API keys:

Terminal window
export OPENAI_API_KEY="your_openai_key"
export ANTHROPIC_API_KEY="your_anthropic_key"
export GOOGLE_API_KEY="your_google_api_key"

Spring Shell is an easy way to interact with the Embabel agent framework, especially during development.

Type help to see available commands, or use execute / x to run an agent:

execute "Lynda is a Scorpio, find news for her" -p -r

The -p and -r flags log prompts and LLM responses respectively; omit them for quiet output. Use chat for an interactive conversation, and choose-goal to inspect how Embabel ranks goals without running anything.

For a full description of every command, flags, tab completion, and history shortcuts, see Embabel Shell.

Try these commands in the shell:

# Simple horoscope agent
execute "My name is Sarah and I'm a Leo"
# Research with web tools (requires Docker Desktop with MCP extension)
execute "research the recent australian federal election. what is the position of the Greens party?"
# Fact checking
x "fact check the following: holden cars are still made in australia"

You can add custom shell commands to invoke specific agents directly during development. See Implementing Custom Shell Commands for a full example and explanation.