English | 中文
An LLM-powered multi-agent business travel planning system that connects preference memory, knowledge-grounded question answering, real-time information lookup, and itinerary generation into a single end-to-end assistant flow. The project follows a Plan-and-Execute architecture built on AgentScope, a local RAG knowledge base, long-term memory, and a skill-based plugin structure.
- Designed for business travel scenarios rather than single-turn Q&A or one-off itinerary generation
- Starts from natural language input and completes intent recognition, agent orchestration, result aggregation, and memory updates
- Supports preference management, memory lookup, enterprise knowledge QA, real-time information queries, event collection, and itinerary planning
- The main flow has been validated end to end:
preference,memory_query,rag_knowledge,information_query,event_collection,itinerary_planning, andcli.py
- Multi-agent orchestration: uses an
IntentionAgent -> OrchestrationAgent -> Skillsexecution flow with multi-intent recognition and priority-based scheduling - Preference memory: stores and updates long-term user preferences such as home location, transportation, hotel, and food preferences, and supports recall through
memory_query - Enterprise knowledge QA: uses a local vector store to answer travel-policy questions such as reimbursement rules, booking guidance, standards, and emergency procedures
- Real-time information lookup: supports weather queries and public web search. Weather is provided by
WeatherAPI.com, while open information is enriched through web search for downstream planning - Itinerary planning: combines structured trip details, long-term preferences, and external information into a personalized business travel plan
- Skill-based plugin architecture: each capability is organized as a skill under
.claude/skills/, loaded on demand throughLazyAgentRegistry;SKILL.mddefines behavior boundaries and prompt rules, whilescript/agent.pycontains executable logic
A representative input:
I recently moved to Suzhou. For this trip, I no longer want to take high-speed rail and would prefer a direct flight instead. I still want a quiet hotel, ideally close to a metro station, and I want lighter food. Next week I need to travel from Suzhou to Wuhan for a 4-day business trip. First, tell me how long I usually have to submit reimbursement after a trip, then check the weather in Wuhan for next week, and finally plan a business travel itinerary based on these updated preferences.
For a request like this, the system can:
- update user preferences
- answer travel-policy questions
- query weather information
- extract trip details
- generate a personalized business travel plan
pip install -r requirements.txtIf you have adjusted RAG-related dependencies locally, make sure the following remain compatible in your environment:
numpytorchsentence-transformers
Edit config.py and provide your LLM settings:
LLM_CONFIG = {
"api_key": "YOUR_LLM_API_KEY",
"model_name": "YOUR_MODEL_NAME",
"base_url": "YOUR_BASE_URL",
}Set up WeatherAPI.com in config.py:
WEATHER_API_CONFIG = {
"provider": "weatherapi",
"api_key": "YOUR_WEATHERAPI_KEY",
"base_url": "https://api.weatherapi.com/v1",
"language": "zh",
}python .claude/skills/ask-question/script/init_knowledge_base.pypython cli.pyThe backend now has an explicit startup module under backend/.
python -m backend.runor:
uvicorn backend.app.main:app --reloadCore endpoints for the first phase:
POST /api/v1/sessions: create a session withuser_idPOST /api/v1/sessions/{session_id}/chat: send one natural-language requestPOST /api/v1/sessions/{session_id}/tasks: create an observable taskGET /api/v1/sessions/{session_id}/tasks/{task_id}: poll task status, intention result, and progressGET /api/v1/sessions/{session_id}/status: inspect memory and loaded agentsGET /api/v1/sessions/{session_id}/history: fetch trip historyGET /api/v1/sessions/{session_id}/preferences: fetch saved preferencesPOST /api/v1/sessions/{session_id}/clear: clear short-term memoryPOST /api/v1/sessions/{session_id}/end: close the session
The frontend is now a separate Vue + Vite app under frontend/.
cd frontend
npm install
npm run devThe frontend currently uses the task endpoints rather than SSE:
- submit a task
- poll status
- visualize intention recognition first
- then render agent progress and final report
Current frontend behavior:
- changing
userIdautomatically rebuilds the session - session-level context is cleared when switching users
- long-term memory still persists by
userIdunderdata/memory/
User Input
↓
IntentionAgent
↓
OrchestrationAgent
↓
Skills
- preference
- memory_query
- event_collection
- rag_knowledge
- information_query
- itinerary_planning
↓
CLI / Final Response
.
├── backend/ # backend app, agents, services, context, utils
│ ├── app/ # FastAPI entrypoint
│ ├── agents/ # core orchestration and lazy-loading logic
│ ├── context/ # memory manager and long-term memory
│ ├── services/ # reusable application service layer
│ ├── utils/ # backend utilities
│ └── run.py # backend startup module
├── frontend/ # Vue + Vite frontend
├── data/ # local memory, models, and knowledge files
├── .claude/skills/ # skill plugins
├── tests/ # unit and integration tests
├── cli.py # interactive CLI entry point
├── config.py # model, weather, and RAG configuration
└── README.md
- Integrated validation has been completed for both
IntentionAgentandOrchestrationAgent - The main flow covering preference memory, enterprise knowledge QA, weather lookup, event extraction, and itinerary planning has been verified
- The CLI entry point has also passed basic regression testing
- Redis as a hot-data and session cache layer
- PostgreSQL as structured long-term memory storage
- RAG improvements: query rewrite, hybrid retrieval, and reranking
- Stronger transport realism constraints and more stable budget estimation