Video

Demo: Build and deploy a multi-agent system with Akka

1 minute read

In this demo, we build an agent with intrinsic memory, an HTTP endpoint, and deployed to a 3 node cluster. We use Claude Code to facilitate the rapid creation in minutes.

Generate agent

Use akka-context folder that contains Akka SDK documentation and check Agent 
docs.
Create an Akka SDK agent named `GreetingAgent` that assists users in learning 
greetings in different languages.
- **Input:** A string question.
- **Output:** Returns an `Effect<String>`.
- method with name `ask`
- Do not perform any environment variables check.
- Do not add JavaDoc annotations
- place it into com.example.application package
- system message should be a static variable
- **Guidelines for system prompt:**
  - The user must provide a language.
  - Always append the language used in parentheses in English (e.g., "Bonjour 
  (French)").
  - At the end of each response, append a list of previous greetings used in 
  the current session.

Add endpoint

Use akka-context folder that contains Akka SDK documentation and check Endpoint 
docs and how to call an Agent.
Implement an HTTP endpoint `GreetingAgentEndpoint` with the following 
specifications:
- **Base path:** `/chat`
- **Endpoint:** POST `/ask`
- **Request:** Accepts a JSON record `QueryRequest` with fields `String userId` 
and `String question`. 
- Put the QueryRequest in the GreetingAgentEndpoint class
- The agent should use `userId` as the sessionId and `question` as the 
user message.
- add acl for all access

When AI Needs an SLA