Starting point for your own agent development using the Embabel framework.
Uses Spring Boot 3.5.9 and Embabel 0.3.1.
Add your magic here!
Illustrates:
Ai instance to enable it to
perform LLM operations.For the Java equivalent, see our Java 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.kt for the
implementation.animal: Runs a simple demo using an Embabel injected Ai instance to call an LLM.
See InjectedDemo.To get a feel for working with Embabel, try the following:
WriteAndReviewAgent and InjectedDemo.withLlm calls.@Agent classes are Spring beans.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.
This repository includes unit tests demonstrating how to test Embabel agents.
mvn test
Unit tests use Embabel's FakeOperationContext and FakePromptRunner to test agent actions in isolation without
calling actual LLMs.
See WriteAndReviewAgentTest.kt for examples of:
FakeOperationContext.create()context.expectResponse()promptRunner.llmInvocationsval context = FakeOperationContext.create()
context.expectResponse(Story("Once upon a time..."))
val story = agent.craftStory(userInput, context.ai())
val prompt = context.llmInvocations.first().messages.first().content
assertTrue(prompt.contains("knight"))
Kotlin
72.4%
Shell
15.4%
Batchfile
12.2%
Starting point for your own agent development using the Embabel framework.
Uses Spring Boot 3.5.9 and Embabel 0.3.1.
Add your magic here!
Illustrates:
Ai instance to enable it to
perform LLM operations.For the Java equivalent, see our Java 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.kt for the
implementation.animal: Runs a simple demo using an Embabel injected Ai instance to call an LLM.
See InjectedDemo.To get a feel for working with Embabel, try the following:
WriteAndReviewAgent and InjectedDemo.withLlm calls.@Agent classes are Spring beans.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.
This repository includes unit tests demonstrating how to test Embabel agents.
mvn test
Unit tests use Embabel's FakeOperationContext and FakePromptRunner to test agent actions in isolation without
calling actual LLMs.
See WriteAndReviewAgentTest.kt for examples of:
FakeOperationContext.create()context.expectResponse()promptRunner.llmInvocationsval context = FakeOperationContext.create()
context.expectResponse(Story("Once upon a time..."))
val story = agent.craftStory(userInput, context.ai())
val prompt = context.llmInvocations.first().messages.first().content
assertTrue(prompt.contains("knight"))
Kotlin
72.4%
Shell
15.4%
Batchfile
12.2%