{"id":29677229,"url":"https://github.com/trgiangdo/travel_planner","last_synced_at":"2025-10-29T00:18:47.561Z","repository":{"id":305004283,"uuid":"1021215436","full_name":"trgiangdo/travel_planner","owner":"trgiangdo","description":"A travel planner system that utilizes suitable AI agents and tools","archived":false,"fork":false,"pushed_at":"2025-07-17T16:41:30.000Z","size":109,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-22T22:50:31.420Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trgiangdo.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-17T04:31:27.000Z","updated_at":"2025-07-17T16:41:33.000Z","dependencies_parsed_at":"2025-07-17T22:33:32.653Z","dependency_job_id":null,"html_url":"https://github.com/trgiangdo/travel_planner","commit_stats":null,"previous_names":["trgiangdo/travel_planner"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/trgiangdo/travel_planner","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trgiangdo%2Ftravel_planner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trgiangdo%2Ftravel_planner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trgiangdo%2Ftravel_planner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trgiangdo%2Ftravel_planner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trgiangdo","download_url":"https://codeload.github.com/trgiangdo/travel_planner/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trgiangdo%2Ftravel_planner/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":281534483,"owners_count":26518035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-28T02:00:06.022Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-23T00:34:55.437Z","updated_at":"2025-10-29T00:18:47.527Z","avatar_url":"https://github.com/trgiangdo.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"---\ntitle: Travel planner\nemoji: 🕵🏻‍♂️\ncolorFrom: indigo\ncolorTo: indigo\nsdk: gradio\nsdk_version: 5.34.2\napp_file: app.py\npinned: false\nhf_oauth: true\n# optional, default duration is 8 hours/480 minutes. Max duration is 30 days/43200 minutes.\nhf_oauth_expiration_minutes: 480\n---\n\n# LLM Trip Planner Agent\n\nThis project is a conversational AI agent that helps users plan personalized trips. Built with LangGraph and Gradio, the agent intelligently gathers necessary information like the user's desired destination and interests before generating a customized travel itinerary.\n\n## Features\n\n- **Conversational UI:** An intuitive chat interface powered by Gradio for seamless user interaction.\n- **Stateful Conversations:** The agent remembers the context of the conversation, such as the user's specified location and interests, across multiple turns.\n- **Intelligent Information Extraction:** The agent can parse user messages to find key details, even if they are provided in separate messages.\n- **Personalized Plan Generation:** Once all required information is gathered, the agent uses an LLM to create a travel plan tailored to the user's needs.\n\n## How It Works\n\nThe application consists of a Gradio front-end and a LangGraph-powered back-end. LangGraph orchestrates the flow of the conversation, managing the agent's state and deciding which action to take next.\n\nThe core logic is defined in a state graph, which visualizes the flow of the agent's decision-making process.\n\n### Agent Graph\n\n![Trip Planner Agent Graph](agents/graphs/trip_planner_agent.png)\n\nThe graph consists of the following key nodes:\n\n- **`extract_info`**: This is the entry point of the graph. It analyzes the user's messages to extract the `location` and `interests`.\n- **`router`**: After the `extract_info` node, a conditional router checks the current state:\n    - If a `location` is missing, it routes the conversation to the `ask_for_location` node.\n    - If the `location` is present but `interests` are missing, it routes to the `ask_for_interests` node.\n    - If both `location` and `interests` are present, it routes to the `generate_plan` node.\n- **`ask_for_location`**: If the destination is unknown, this node generates a message asking the user to provide one.\n- **`ask_for_interests`**: If the user's interests are unknown, this node generates a message asking the user to describe them.\n- **`generate_plan`**: Once all necessary information has been collected, this node calls the LLM to create a personalized travel plan.\n\n## Setup and Installation\n\n1.  **Clone the repository**\n    ```bash\n    git clone https://github.com/trgiangdo/travel_planner.git\n    cd travel_planner\n    ```\n\n2.  **Create and install the dependencies**\n    This project uses `uv` for package management.\n    ```bash\n    uv venv\n    uv sync\n    ```\n\n3.  **Set up environment variables:**\n    Create a `.env` file by copying the example and add your OpenAI API key.\n    ```bash\n    cp .env_example .env\n    ```\n    Now, edit the `.env` file to add your credentials.\n\n## Usage\n\nTo run the application, use the following command:\n\n```bash\nuv run gradio app.py\n```\n\nThis will start the Gradio server with hot-reloading. You can access the chat interface by opening the provided URL in your web browser.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrgiangdo%2Ftravel_planner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrgiangdo%2Ftravel_planner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrgiangdo%2Ftravel_planner/lists"}