An autonomous AI agent that plans complete trip itineraries using natural language processing, multi-step reasoning, and adaptive re-planning. Built for the 24-hour hackathon challenge with Nemotron LLM integration.
Unlike simple chatbots, this is a true autonomous agent that:
- 🧠 Plans multi-step execution workflows
- ⚡ Executes tool calls and tracks budget state
- 🔄 Re-plans when constraints break (budget/weather/location)
- 📊 Logs all decisions with transparent reasoning
- 🗺️ Synthesizes complete itineraries with maps and schedules
# Clone and run immediately with mock data
git clone <your-repo>
cd itinerary-agent
pip install -r requirements.txt
streamlit run app.py# 1. Copy environment template
cp env.example .env
# 2. Add your Nemotron API credentials to .env
LLM_API_BASE=https://integrate.api.nvidia.com/v1
LLM_API_KEY=your_nvidia_nim_api_key_here
LLM_MODEL=nvidia/nemotron-4-340b-reward
USE_MOCKS=false
# 3. Run the app
streamlit run app.pyUser Request → Planner → Executor → Synthesizer → Itinerary
↓ ↓ ↓ ↓ ↓
Parse → Create Plan → Execute → Re-plan → Output
agent/state.py: Pydantic models for all data structuresagent/llm.py: Nemotron client with robust fallbacksagent/planner.py: Creates ordered execution plans with budget allocationagent/executor.py: Runs tools, tracks budget, handles re-planningagent/synthesizer.py: Generates final itinerary with maps and schedulestools/: API wrappers for maps, weather, places, hotels (with mocks)
Set budget to $500 to trigger Plan B hotel selection:
- Agent finds expensive hotels first
- Detects budget constraint
- Automatically searches for cheaper options
- Logs the decision process
Toggle weather to "rainy" in the sidebar:
- Agent checks forecast
- Detects rain >50% chance
- Swaps outdoor activities for indoor alternatives
- Shows weather re-planning in agent log
Select "BBQ" and "live music":
- Agent finds Stubb's Bar-B-Q (satisfies both interests)
- Prioritizes venues that match multiple preferences
- Optimizes activity selection
The app shows complete transparency with:
🤖 Agent Execution Log
├── Step 1: maps.find_directions
│ ├── Input: {"origin": "Dallas, TX", "destination": "Austin, TX"}
│ ├── Cost: $27.30
│ └── Notes: Driving route: 195 miles, 195 min, $27.30 gas
├── Step 2: hotels.search
│ ├── Input: {"city": "Austin, TX", "max_price": 200}
│ ├── Cost: $240.00
│ └── Notes: Hotel selected: Hampton Inn - $240.00 total
└── Step 3: activities.select
├── Cost: $67.00
└── Notes: Selected 4 activities (including 1 multi-interest match)
- Morning/Afternoon/Evening time blocks
- Activities with ratings, costs, and links
- Hotel check-in/check-out handling
- Transport, lodging, activities breakdown
- Visual budget utilization chart
- Remaining budget tracking
- Hotel pins (red) and activity pins (blue)
- Clickable markers with info and links
- Geographic optimization visualization
- JSON: Complete itinerary data
- Calendar Events: Import into Google Calendar/Outlook
# Nemotron LLM Configuration
LLM_API_BASE=https://integrate.api.nvidia.com/v1
LLM_API_KEY=your_nvidia_nim_api_key_here
LLM_MODEL=nvidia/nemotron-4-340b-reward
LLM_PROVIDER=openai_compatible
# Mock Data (default: true for demo)
USE_MOCKS=true
# Demo Controls
WEATHER_DEMO_MODE=sunny # or "rainy"data/mock/places_austin.json- Austin venues with overlapping interestsdata/mock/hotels_austin.json- Hotels at various price pointsdata/mock/weather_next_weekend.json- Sunny/rainy weather patterns
# Run all tests
pytest
# Run specific test file
pytest tests/test_planner.py
pytest tests/test_executor.py
# Run with coverage
pytest --cov=agent tests/- Planner: Plan structure, tool assignment, budget allocation, LLM integration
- Executor: Tool execution, budget tracking, constraint detection, re-planning
- Mock Integration: Deterministic fallbacks, constraint triggering
- Route: Dallas → Austin
- Budget: $800
- Interests: BBQ + Live Music
- Expected: Driving, mid-range hotel, Stubb's Bar-B-Q (multi-interest match)
- Budget: $500
- Expected: Plan B hotel triggered, agent log shows downgrade decision
- Weather: Toggle to "rainy"
- Expected: Indoor activities prioritized, weather re-plan logged
- Result: Activities clustered near hotel, travel time minimized
# Push to GitHub, then deploy via Streamlit Cloud
# Add secrets in Streamlit Cloud dashboard:
LLM_API_KEY = "your_key"
LLM_API_BASE = "your_endpoint"FROM python:3.11-slim
COPY . /app
WORKDIR /app
RUN pip install -r requirements.txt
EXPOSE 8501
CMD ["streamlit", "run", "app.py"]- Create tool in
tools/new_tool.py - Add mock data in
data/mock/ - Update executor to handle new tool calls
- Add tests for the tool
- Update
executor.pyconstraint checking - Add re-planning logic in
planner.py - Test constraint triggering
- Modify
agent/llm.pyfor new providers - Update schema handling for structured outputs
- Maintain fallback compatibility
- Type safety for complex state management
- JSON schema generation for LLM structured outputs
- Validation and serialization built-in
- Rapid prototyping for hackathon timeline
- Built-in interactivity and visualization
- Easy deployment and sharing
- Reliable demos without API dependencies
- Faster development and testing
- Deterministic behavior for presentations
"This isn't just a trip planner - it's an autonomous agent!"
- 🧠 Shows Reasoning: Complete decision log with cost tracking
- 🔄 Adapts to Constraints: Budget and weather re-planning
- 🎯 Optimizes Choices: Multi-interest matching, location clustering
- 📊 Transparent Process: Every tool call and decision logged
- 🗺️ Visual Output: Interactive maps with optimized routes
✅ Autonomous Agent (not chatbot) - Multi-step reasoning with state management
✅ Nemotron Integration - LLM-powered planning with structured outputs
✅ Constraint Handling - Budget/weather/geo re-planning with logging
✅ Complete Demo - End-to-end workflow with visual outputs
✅ Production Ready - Tests, documentation, deployment instructions
Built with ❤️ for the Nemotron Hackathon Challenge
"An agent that doesn't just chat about travel - it actually plans your trip."