Starting point for your own agent development using the Embabel framework.
Add your magic here!
Illustrates:
- An injected demo showing how any Spring component can be injected with an Embabel
Ai
instance to enable it to perform LLM operations. - A simple agent
- Unit tests for an agent verifying prompts and hyperparameters
For the Kotlin equivalent, see our Kotlin agent template.
Run the shell script to start Embabel under Spring Shell:
./scripts/shell.sh
There is a single example agent, WriteAndReviewAgent. It uses one LLM with a high temperature and creative persona to write a story based on your input, then another LLM with a low temperature and different persona to review the story.
When the Embabel shell comes up, invoke the story agent like this:
x "Tell me a story about...[your topic]"
Try the following other shell commands:
demo
: Runs the same agent, invoked programmatically, instead of dynamically based on user input. See DemoCommands.java for the implementation.animal
: Runs a simple demo using an Embabel injectedAi
instance to call an LLM. See InjectedDemo.
To get a feel for working with Embabel, try the following:
- Modify the prompts in
WriteAndReviewAgent
andInjectedDemo
. - Experiment with different models and hyperparameters by modifying
withLlm
calls. - Integrate your own services, injecting them with Spring. All Embabel
@Agent
classes are Spring beans. - Run the tests with
mvn test
and modify them to experiment with prompt verification.
To see tool support, check out the more complex Embabel Agent API Examples repository.
Embabel integrates with any LLM supported by Spring AI.
See LLM integration guide (work in progress).
Also see Spring AI models.
Embabel integrates with Google A2a. See A2A integration.