Collaborative travel planner
HAII Assignment 2 β vijayars. This repository publishes the custom Python agent and its Gradio interface. It contains no model weights or AWS credentials and does not provide a hosted inference endpoint or live web app.
The planner uses AWS Bedrock DeepSeek R1, structured search and webpage actions, quote-backed confirmed facts, tentative preferences, editable trip constraints, and source/structured-price checks. It does not book trips or set reminders.
Download and run
Requires Python 3.12 and AWS credentials with access to the selected Bedrock model. Configure credentials privately on the machine where you run the app, using the assignment notebook's hidden prompts or the standard AWS credential chain. Never put credentials in this repository. Inference uses the runner's AWS account.
python -m pip install huggingface_hub
hf download vijayars-tep/HAII-collaborative-travel-planner --local-dir travel-planner
cd travel-planner
python -m pip install -r requirements.txt
python app.py
The local interface opens on port 7860. The default region is us-east-1; set AWS_REGION_NAME if your model access uses another supported region. Temporary credentials also need AWS_SESSION_TOKEN and expire normally.
This is a custom planner rather than a serialized smolagents CodeAgent, so load its Python module rather than calling CodeAgent.from_hub:
from huggingface_hub import snapshot_download
import importlib.util
from pathlib import Path
from smolagents import LiteLLMModel
import litellm
folder = Path(snapshot_download("vijayars-tep/HAII-collaborative-travel-planner"))
spec = importlib.util.spec_from_file_location("collaborative_agent", folder / "collaborative_agent.py")
module = importlib.util.module_from_spec(spec)
spec.loader.exec_module(module)
litellm.drop_params = True
model = LiteLLMModel(model_id="bedrock/us.deepseek.r1-v1:0", stopSequences=[])
planner = module.CollaborativePlanner(model)
# A real paid Bedrock call occurs only when you call planner.respond(...).
Evaluation and limitations
The submitted notebook contains the historical baseline/improved UI transcripts and screenshots. This repository publishes the implementation, not proof of who operated those tests. The qualitative evaluation was iterative, not a frozen-build reliability study. Known remaining failures include free prose contradicting a budget card, missing source links, past-date advice, unsupported reminder offers, and occasional JSON/extraction errors. Quotation matching does not prove factual entailment, and future rates/accessibility are not guaranteed.
Final regression validation
Run python -m unittest -v test_collaborative_agent.py after installing the
requirements. Thirteen deterministic checks use a scripted model and fake research
tools, without Bedrock calls. The four final review checks address older quoted
facts undoing corrections, currency/budget prose contradicting checked ranges,
and retained known links when quotations fail validation. These improve specific
host rules, not all semantic reasoning. The notebook keeps the earlier paired UI
results unchanged and distinguishes them from this later offline validation.