A trip planning swarm that creates an itinerary together with a customer. The end result is an itinerary with route times and distances calculated between activities.
The following diagram outlines the key components of the Swarm, with highlights being:

TAGS: trip planning, swarm, graphrag, structured output, itinerary planning, travel automation, routing agent, falkordb, google maps integration
Requires Python >= 3.12.
uv sync
Or with pip:
pip install "ag2[graph-rag-falkor-db]>=0.9.9" python-dotenv requests
FalkorDB is required to run the GraphRAG agent. Start it with Docker:
docker run -d --name travel-planner-falkordb -p 6379:6379 falkordb/falkordb:latest
Note: If port 6379 is already in use by another project, use a different port (e.g.
-p 6381:6379) and setFALKORDB_PORT=6381in your.envfile.
cp .env.example .env
Open .env and fill in:
OPENAI_API_KEY — requiredFALKORDB_PORT — change if you used a different port aboveGOOGLE_MAP_API_KEY — optional, needed for travel time calculation between locationspython main.py
You can interact with the system through the command line to plan a trip to Rome. Modify the initial message at the bottom of main.py to plan a trip to another city.
Tip: After the first run, the FalkorDB graph is already populated. Switch
init_dbtoconnect_dbinmain.pyfor faster subsequent runs.
This project is licensed under the Apache License 2.0. See the LICENSE for details.