AI Kitchen — a FastAPI service that acts as a "personal chef." Given a photo or list of ingredients, it uses an LLM agent to identify ingredients, search for recipes via Tavily, score them by nutrition and difficulty, and return structured meal recommendations.
- Python >=3.12, managed with
uv - FastAPI for HTTP API
- LangChain (
langchain,langchain-openai,langchain-tavily) for agent orchestration - Qwen model (
qwen3.5-flash) via DashScope, using OpenAI-compatible API - Tavily for web search
- Alibaba Cloud OSS for object storage
# Install dependencies
uv sync
# Run the app
uv run uvicorn app.main:app --reloadCopy .env.example to .env and set:
DASHSCOPE_API_KEY— DashScope API key (Qwen model access)DASHSCOPE_BASE_URL— DashScope base URL (OpenAI-compatible endpoint)TAVILY_API_KEY— Tavily search API key
app/
├── main.py # FastAPI app entry point
├── agents/ # LangChain agent definitions
│ └── personal_chief.py # Personal chef agent (ingredient → recipe recommendations)
├── api/v1/ # API route handlers
├── models/ # Pydantic models / data schemas
└── common/ # Shared utilitiesCore flow: The agent in personal_chief.py loads a Qwen LLM model via init_chat_model (OpenAI-compatible provider), wires it with a TavilySearch tool, and provides a structured system prompt that enforces a 4-step pipeline: identify ingredients → search recipes → score by nutrition + difficulty → output structured report.