NashTech Blog

Akka Agent AI: Secret to Planning a Perfect Trip – Part 1

Table of Contents

Welcome back to our journey of Akka Agentic AI! In our previous blog, we said our first “Hello!” to an Akka AI Agent and saw how it responds back in different languages. In this article, we will take a step forward and plan our next trip/activity using Akka Agentic AI recommendations.

Planning AI Agent

Let’s start with creating a Planning AI Agent which will suggest us with real-world places we can visit.

  • Annotate the AI Agent class with @ComponentId and pass a unique identifier for this agent type.
  • Extend the class with Agent.
  • Define the command handler method.
  • Define the system message (prompt) as a constant.
  • Define the user message (input) for the specific request.
  • Use the system message and user message in the effect builder.

As we are aware, from our previous blog, that system message acts as a system-level instruction to the AI Model (OpenAI in this case) that defines AI Agent’s behavior. Also, to customize the response, user input will act as a query for the AI Model. Hence, if you need to create an agent for a different purpose, defining an appropriate system message is important.

Expose AI Agent to World!

Next we need to open the AI Agent’s access to everyone via internet to make it easy to try out:

  • Inject the ComponentClient, which is used to call the AI Agent.
  • Call the PlanningAgent created in the previous step

Configure AI Model

Previously, we used OpenAI (gpt-4o-mini) AI Model and we will continue to do the same

Let’s Plan a Trip!

Set OpenAI API Key as environment variable

Start the service locally

Use curl/postman to call the Endpoint

Next Steps

  • To get more personalized trip planning, we will learn how to add User context to the PlanningAgent in our next blog.
  • Also, we will learn more about Agent interface.

References

Picture of Himanshu Gupta

Himanshu Gupta

Himanshu Gupta is a Principal Architect passionate about building scalable systems, AI‑driven solutions, and high‑impact digital platforms. He enjoys exploring emerging technologies, writing technical articles, and creating accelerators that help teams move faster. Outside of work, he focuses on continuous learning and sharing knowledge with the tech community.

Leave a Comment

Your email address will not be published. Required fields are marked *

Suggested Article

Scroll to Top