Skip to content

maymust-seungmin/langgraph-agent-openwebui-demo

 
 

Repository files navigation

Data Analyst Agent in LangGraph + Open WebUI

This repo contains code demos that were discussed in "Open WebUI + LangGraph AI Agents with Python Executor and Postgres Database-A Walkthrough".

Disclaimer: This repository is just a demonstration of what is possible with LangGraph agents and Open WebUI integration. It will not be actively maintained.

This repo will teach you how to:

  • Create AI Agent (agent AI) in LangGraph that can use Python Executor and Postgres Database
  • Integrate the LangGraph agents with Open WebUI via Pipelines

Note that we use OpenAI API models for fast prototyping. You can use Ollama to run local LLM API. However, the instruction is not provided in this repo.

Set Up

  1. Create conda environment with python=3.12.9
  2. Install dependencies with poetry
poetry install
  1. Set up OpenAI API key via .env file (which should be located in langgraph_agents/config/):
OPENAI_API_KEY=your_openai_api_key
  1. Set up Postgres connection string in .env file (which should be located in langgraph_agents/config/). This is optional if you do not want to access Postgres database.
POSTGRES_USER=your_postgres_user
POSTGRES_PASSWORD=your_postgres_password
POSTGRES_HOST=your_postgres_host
POSTGRES_PORT=your_postgres_port
POSTGRES_DB=your_postgres_db

Run

  1. Activate your conda environment
  2. Simply run:
sh start.sh
  1. Open Open WebUI and make sure your pipeline is connected to it.
  2. Use 'Data Analyst' agent as a model to chat.

Sharing & Crediting

Feel free to copy and distribute, but we appreciate you giving us credits.

⛓️Connect with Us:

👍 Like | 🔗 Share | 📢 Subscribe | 💬 Comments | ❓ Questions

LinkedIn
YouTube
Facebook
TikTok
Github
SubStack

About

Open WebUI + LangGraph AI Agents with Python Executor and Postgres Database

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 95.6%
  • Shell 4.3%
  • Batchfile 0.1%