Your AI travel agent for buses in Tanzania — search, compare, recommend, book seats, pay with mobile money, and manage tickets. Built on Pawa AI with a Streamlit UI.
- Natural-language travel requests in Kiswahili, English, or mixed speech
- Search & compare buses across operators (CSV demo inventory)
- Preference-aware recommendations (price, time, AC/Wi-Fi, class)
- Full booking loop: seat → payment → digital ticket
- Cancel / reschedule / track trip tools
- Optional STT / TTS voice booking via Pawa Voice APIs
- Optional Knowledge Base + semantic retrieval for transport FAQs
cd /Volumes/Sartify/transpo_agent_by_pawa_ai
source .transpo-env/bin/activate # or: python3 -m venv .transpo-env && source .transpo-env/bin/activate
pip install -r requirements.txt
cp .env.example .env
# put your key from https://builder.pawa-ai.com/dashboard?page=keys
streamlit run app.pyOpen the URL Streamlit prints (usually http://localhost:8501). The API key is read only from .env.
python scripts/setup_knowledge_base.py
# copy printed PAWA_KB_REFERENCE_ID into .envapp.py Streamlit UI
src/
pawa_client.py Chat (stream/tools/reasoning/RAG), TTS, STT, KB
agent.py Tool-calling agent loop
tools.py search_buses, reserve_seat, make_payment, ...
data_layer.py CSV queries + city/date normalization
booking_service.py Reserve / pay / confirm / cancel / reschedule
data/
cities.csv stations.csv operators.csv routes.csv
buses.csv seats.csv payment_methods.csv bookings.csv
knowledge/tanzania_transport_guide.txt
Nataka kwenda Mwanza kesho usiku kutoka Dar.Natafuta basi la bei nafuu kwenda Arusha Ijumaa.Nataka kwenda Arusha kutoka Dar kesho, sitaki basi linaloondoka kabla ya saa 12, budget yangu ni 30,000.
Any Streamlit host works (Streamlit Community Cloud, Railway, Render, VM):
- Set
PAWA_AI_API_KEYas a secret. - Start command:
streamlit run app.py --server.port=$PORT --server.address=0.0.0.0 - Persist
/data/bookings.csvand/bookingsif you want tickets to survive restarts.
- Bus inventory is demo CSV data (sample operators/fares for ~14 days from 2026-08-15) so the full agent loop works without a live GDS.
- Payments are simulated successful mobile-money/bank transactions for demo purposes.
- Docs: Pawa introduction · Chat · TTS · STT · Knowledge Base