| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
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:
For the Kotlin equivalent, see our Kotlin agent template.
Run the shell script to start Embabel under Spring Shell:
./scripts/shell.shThere 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:
To get a feel for working with Embabel, try the following:
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 and integration tests demonstrating how to test Embabel agents.
mvn testUnit tests use Embabel's FakeOperationContext and FakePromptRunner to test agent actions in isolation without calling actual LLMs.
See WriteAndReviewAgentTest.java for examples of:
var context = FakeOperationContext.create();
context.expectResponse(new Story("Once upon a time..."));
var story = agent.craftStory(userInput, context.ai());
var prompt = context.getLlmInvocations().getFirst().getMessages().getFirst().getContent();
assertTrue(prompt.contains("knight"));Integration tests extend EmbabelMockitoIntegrationTest to test complete agent workflows under Spring Boot with a fully configured AgentPlatform.
See WriteAndReviewAgentIntegrationTest.java for examples of:
whenCreateObject(prompt -> prompt.contains("Craft a short story"), Story.class)
.thenReturn(new Story("AI will transform our world..."));
var invocation = AgentInvocation.create(agentPlatform, ReviewedStory.class);
var result = invocation.invoke(input);
verifyCreateObjectMatching(
prompt -> prompt.contains("Craft a short story"),
Story.class,
llm -> llm.getLlm().getTemperature() == 0.7
);| Back | FazBrowse Home | New Git URL |