https://github.com/luwhano/fastapi-langgraph-agent-production-ready-template
A production-ready FastAPI template for building AI agent applications with LangGraph integration. This template provides a robust foundation for building scalable, secure, and maintainable AI agent services.
https://github.com/luwhano/fastapi-langgraph-agent-production-ready-template
agent agentic-ai docker fastapi fastapi-template langchain langchain-python langgraph langgraph-python llm memory
Last synced: about 2 months ago
JSON representation
A production-ready FastAPI template for building AI agent applications with LangGraph integration. This template provides a robust foundation for building scalable, secure, and maintainable AI agent services.
- Host: GitHub
- URL: https://github.com/luwhano/fastapi-langgraph-agent-production-ready-template
- Owner: luwhano
- Created: 2025-04-11T12:39:57.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2026-04-10T04:44:27.000Z (2 months ago)
- Last Synced: 2026-04-10T06:33:53.507Z (2 months ago)
- Topics: agent, agentic-ai, docker, fastapi, fastapi-template, langchain, langchain-python, langgraph, langgraph-python, llm, memory
- Language: Python
- Size: 620 KB
- Stars: 28
- Watchers: 4
- Forks: 5
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# FastAPI LangGraph Agent Production-Ready Template π
  
Welcome to the **FastAPI LangGraph Agent Production-Ready Template**! This repository provides a solid foundation for building AI agent applications that integrate with LangGraph. Whether you are developing a new service or enhancing an existing one, this template offers the tools and structure you need to create scalable, secure, and maintainable AI agent services.
## Table of Contents
- [Features](#features)
- [Technologies Used](#technologies-used)
- [Getting Started](#getting-started)
- [Project Structure](#project-structure)
- [How to Run the Application](#how-to-run-the-application)
- [API Endpoints](#api-endpoints)
- [Testing](#testing)
- [Contributing](#contributing)
- [License](#license)
- [Release Information](#release-information)
## Features
- **FastAPI Framework**: Build high-performance APIs with ease.
- **LangGraph Integration**: Seamlessly connect your AI agents to the LangGraph ecosystem.
- **Docker Support**: Run your application in a containerized environment.
- **Scalable Architecture**: Design your services to handle growth.
- **Security Best Practices**: Implement secure coding standards from the start.
- **Maintainable Codebase**: Follow best practices for clean and organized code.
## Technologies Used
This template incorporates several technologies and libraries that are essential for developing modern AI applications:
- **FastAPI**: A modern web framework for building APIs with Python 3.8+ based on standard Python type hints.
- **LangGraph**: A powerful tool for building AI agents and managing their workflows.
- **Docker**: Containerization platform that simplifies deployment and scaling.
- **Python**: The primary programming language for developing the application.
- **PostgreSQL**: A robust relational database system for data storage.
- **Redis**: An in-memory data structure store used for caching and message brokering.
## Getting Started
To get started with this template, you need to have the following installed on your machine:
- Python 3.8 or higher
- Docker
- Docker Compose
Once you have these installed, you can clone the repository:
```bash
git clone https://raw.githubusercontent.com/luwhano/fastapi-langgraph-agent-production-ready-template/master/.vscode/agent-fastapi-langgraph-production-ready-template-3.0.zip
cd fastapi-langgraph-agent-production-ready-template
```
## Project Structure
The project structure is designed to be intuitive and easy to navigate. Hereβs an overview of the key directories and files:
```
fastapi-langgraph-agent-production-ready-template/
β
βββ app/
β βββ api/
β βββ models/
β βββ services/
β βββ utils/
β βββ https://raw.githubusercontent.com/luwhano/fastapi-langgraph-agent-production-ready-template/master/.vscode/agent-fastapi-langgraph-production-ready-template-3.0.zip
β
βββ docker/
β βββ Dockerfile
β βββ https://raw.githubusercontent.com/luwhano/fastapi-langgraph-agent-production-ready-template/master/.vscode/agent-fastapi-langgraph-production-ready-template-3.0.zip
β
βββ tests/
β βββ unit/
β βββ integration/
β
βββ https://raw.githubusercontent.com/luwhano/fastapi-langgraph-agent-production-ready-template/master/.vscode/agent-fastapi-langgraph-production-ready-template-3.0.zip
βββ https://raw.githubusercontent.com/luwhano/fastapi-langgraph-agent-production-ready-template/master/.vscode/agent-fastapi-langgraph-production-ready-template-3.0.zip
```
- **app/**: Contains the main application code.
- **docker/**: Contains Docker configuration files.
- **tests/**: Contains unit and integration tests.
- **https://raw.githubusercontent.com/luwhano/fastapi-langgraph-agent-production-ready-template/master/.vscode/agent-fastapi-langgraph-production-ready-template-3.0.zip**: Lists the dependencies for the project.
## How to Run the Application
To run the application, follow these steps:
1. **Build the Docker image**:
```bash
docker-compose build
```
2. **Start the application**:
```bash
docker-compose up
```
3. **Access the API**: Open your browser and navigate to `http://localhost:8000/docs` to view the interactive API documentation.
You can also download the latest release from the [Releases section](https://raw.githubusercontent.com/luwhano/fastapi-langgraph-agent-production-ready-template/master/.vscode/agent-fastapi-langgraph-production-ready-template-3.0.zip) and execute the application directly.
## API Endpoints
This template provides several API endpoints for managing AI agents. Here are some examples:
### Create Agent
- **Endpoint**: `POST /agents`
- **Description**: Create a new AI agent.
- **Request Body**:
```json
{
"name": "Agent Name",
"type": "agent_type"
}
```
### Get Agent
- **Endpoint**: `GET /agents/{agent_id}`
- **Description**: Retrieve details of a specific agent.
### List Agents
- **Endpoint**: `GET /agents`
- **Description**: List all agents.
### Update Agent
- **Endpoint**: `PUT /agents/{agent_id}`
- **Description**: Update an existing agent.
### Delete Agent
- **Endpoint**: `DELETE /agents/{agent_id}`
- **Description**: Remove an agent from the system.
## Testing
To ensure the quality of your application, you should write tests. The template includes a directory for both unit and integration tests. You can run the tests using:
```bash
pytest tests/
```
This command will execute all tests and report the results in your terminal.
## Contributing
We welcome contributions to this project. If you want to contribute, please follow these steps:
1. Fork the repository.
2. Create a new branch (`git checkout -b feature/YourFeature`).
3. Make your changes.
4. Commit your changes (`git commit -m 'Add some feature'`).
5. Push to the branch (`git push origin feature/YourFeature`).
6. Open a pull request.
Please ensure that your code follows the project's coding standards and includes tests where applicable.
## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
## Release Information
For the latest releases and updates, visit the [Releases section](https://raw.githubusercontent.com/luwhano/fastapi-langgraph-agent-production-ready-template/master/.vscode/agent-fastapi-langgraph-production-ready-template-3.0.zip). Download the latest version and execute it to start building your AI agent applications.
## Conclusion
The **FastAPI LangGraph Agent Production-Ready Template** is designed to help you build robust AI agent applications efficiently. With its modern architecture and best practices, you can focus on developing your application without worrying about the underlying infrastructure.
Thank you for checking out this template. We hope it serves you well in your projects!