jasperblues/embabel-demo

I'm trying Embabel!

★ 0Forks 0JavaGitHub ↗Compare

README

Steven's Update: I broke it and I don't know how! :(

My first error was:

Web application could not be started as there was no
org.springframework.boot.web.servlet.server.ServletWebServerFactory bean defined in the context.

I fixed this by adding into application.properties:

spring.main.web-application-type=none

Now it won't start, with a new error:

Parameter 1 of constructor in 
com.embabel.agent.mcpserver.support.PerGoalMcpToolExportCallbackPublisher 
required a bean of type 'io.modelcontextprotocol.server.McpSyncServer' 
that could not be found.

I think it was the refactor where I changed the base package from com.embabel.template to com.embabel.demo.

I took a fresh template and less refactors. Please see https://github.com/stevendoolan/embabel-demo2


Build

Java Spring Apache Tomcat Apache Maven ChatGPT JSON GitHub Actions Docker IntelliJ IDEA

    

    

Generated agent

Java agent repository generated by the Embabel project creator.

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

To run

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, use the story agent like this:

x "Tell me a story about...[your topic]"

Try the InjectedDemo command to see simple, non-agent use:

animal

A2A Support

Embabel integrates with the A2A protocol, allowing you to connect to other A2A-enabled agents and services.

Embabel agents can be exposed to A2A with zero developer effort.

Check out the a2a branch of this repository to try A2A support.

You'll need the following environment variable:

  • GOOGLE_STUDIO_API_KEY: Your Google Studio API key, which is used for Gemini.

Start the Google A2A web interface using Docker compose:

docker compose up

Go to the web interface running within the container at http://localhost:12000/.

Connect to your agent at host.docker.internal:8080/a2a. Note that localhost:8080/a2a won't work as the server cannot access it when running in a Docker container.

Your agent will have automatically been exported to A2A. Add it in the UI, and start a chat. You should see something like this:

A2A UI

Contributors

Embabel contributors

Contributors

fctg-stevendoolanstevendoolanjasperblues

Issues