Skip to content

etorres/trip-agent

Repository files navigation

trip-agent

Based on the trip-agent Akka example.

This app represents an agency that searches for flights and accommodations via the prompt from the user through an HTTP call.

It's composed by a LLM Model and tools to find flights, accommodations and sending mails.

Once a search is requested the app will look for the flights, accommodations, and will email the requester with some options and the best value offer.

  • Akka / Tutorials / Additional Samples

TO-DO List

  • Extend the current use case with additional steps, include some iterative refinement, and use it as an opportunity to show other workflows4s' capabilities like loops, timers, and conditional branching.
  • Add items to this list.

Workflow definition

BPMN workflow definition

HTTP API

Create a new trip search:

curl -X POST http://localhost:8989/trip-searches \
  -H "Content-Type: application/json" \
  -d '{"FindTrip":{"question": "Find a trip from Seoul to Tokyo and back, from 2026-05-07 to 2026-05-14. The flight price not higher than 300 total and the total accommodation for the week not higher than 600. Send the suggestion to noop@example.com"}}'
{"SearchStarted":{"response":"We are processing your request. We'll send you the response to your email in a minute. Your request id is: 0P3ZG6ZNMBHYX"}}

Get trip search state:

curl http://localhost:8989/trip-searches/01226N0640J7Q

Get list of all running trip searches:

curl http://localhost:8989/trip-searches

Contributing to the project

Building and testing this project

sbt -v -Dfile.encoding=UTF-8 +check +test

Building distribution from source code

sbt Universal/packageBin

Resources:

(Listed in no specific order)

Akka

BPMN

Development

Troubleshooting

Check scalac compiler options with:

show Compile / scalacOptions

Contributors