安装gemini-fullstack-langgraph-quickstart
环境:
1.用了翻墙软件 申请了gemini 和langgraph的api
2.去这里下载了对应的源码包https://github.com/google-gemini/gemini-fullstack-langgraph-quickstart
3.按照这个安装
Project Structure
The project is divided into two main directories:
frontend/: Contains the React application built with Vite.
backend/: Contains the LangGraph/FastAPI application, including the research agent logic.
Getting Started: Development and Local Testing
Follow these steps to get the application running locally for development and testing.
- Prerequisites:
Node.js and npm (or yarn/pnpm)
Python 3.11+
GEMINI_API_KEY: The backend agent requires a Google Gemini API key.
Navigate to the backend/ directory.
Create a file named .env by copying the backend/.env.example file.
Open the .env file and add your Gemini API key: GEMINI_API_KEY=“YOUR_ACTUAL_API_KEY”
2. Install Dependencies:
Backend:
cd backend
pip install .
Frontend:
cd frontend
npm install
3. Run Development Servers:
Backend & Frontend:
make dev
This will run the backend and frontend development servers. Open your browser and navigate to the frontend development server URL (e.g., http://localhost:5173/app).
Alternatively, you can run the backend and frontend development servers separately. For the backend, open a terminal in the backend/ directory and run langgraph dev. The backend API will be available at http://127.0.0.1:2024. It will also open a browser window to the LangGraph UI. For the frontend, open a terminal in the frontend/ directory and run npm run dev. The frontend will be available at http://localhost:5173.