{"id":34543784,"url":"https://github.com/ssgrummons/langgraph-gradio","last_synced_at":"2026-05-29T02:31:08.917Z","repository":{"id":288281038,"uuid":"963242479","full_name":"ssgrummons/langgraph-gradio","owner":"ssgrummons","description":"Basic LangGraph RAG model with Tool Use and Gradio Frontend.  Configured to use Ollama","archived":false,"fork":false,"pushed_at":"2025-04-16T14:05:14.000Z","size":301,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-16T21:03:31.793Z","etag":null,"topics":["gradio","langgraph-python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ssgrummons.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-09T11:31:15.000Z","updated_at":"2025-04-16T14:05:17.000Z","dependencies_parsed_at":"2025-04-16T21:04:23.563Z","dependency_job_id":"bb3d53a9-8b41-46c8-b718-c4178538687c","html_url":"https://github.com/ssgrummons/langgraph-gradio","commit_stats":null,"previous_names":["ssgrummons/langgraph-gradio"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ssgrummons/langgraph-gradio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssgrummons%2Flanggraph-gradio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssgrummons%2Flanggraph-gradio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssgrummons%2Flanggraph-gradio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssgrummons%2Flanggraph-gradio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ssgrummons","download_url":"https://codeload.github.com/ssgrummons/langgraph-gradio/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ssgrummons%2Flanggraph-gradio/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33634611,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-29T02:00:06.066Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["gradio","langgraph-python"],"created_at":"2025-12-24T06:53:53.171Z","updated_at":"2026-05-29T02:31:08.912Z","avatar_url":"https://github.com/ssgrummons.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Template for LangGraph Integration with Gradio\n\nThis repository provides a simple template demonstrating how to integrate a LangGraph application with a Gradio front end. The implementation uses placeholder tools to showcase the wiring between the components.\n\n### What this project demonstrates:\n1. How to run a LangGraph graph using [Ollama](https://ollama.com/)\n2. How to integrate basic placeholder tools into a LangGraph workflow\n3. How to connect the LangGraph application to a Gradio UI and display chat-based output\n\n---\n\n## Prerequisites\n\nBefore running this project, ensure you have the following installed:\n\n- **[Python 3.12+](https://www.python.org/downloads/)**  \n  This project requires Python 3.12 or higher.\n\n- **[Ollama](https://ollama.com/)**  \n  Ollama is used to run the language model locally.\n\n- **`qwen2:7b` model**  \n  After installing Ollama, pull the model with:\n  ```bash\n  ollama pull qwen2:7b\n  ```\n\n- **[Poetry](https://python-poetry.org/docs/#installation)**  \n  Poetry is used for dependency management and virtual environments.\n\n---\n\n## Installation Instructions\n\n1. **Install Python 3.10+** (if not already installed)  \n   You can check your Python version with:\n   ```bash\n   python3 --version\n   ```\n\n2. **Install Ollama**  \n   Follow the instructions on the [Ollama website](https://ollama.com/download) to install for your platform.\n\n3. **Pull the model**  \n   Once Ollama is installed, pull the `qwen2:7b` model:\n   ```bash\n   ollama pull qwen2:7b\n   ```\n\n4. **Install Poetry**  \n   If you don’t have Poetry installed:\n   ```bash\n   curl -sSL https://install.python-poetry.org | python3 -\n   ```\n\n5. **Clone the repository**\n   ```bash\n   git clone https://github.com/your-username/langgraph-gradio-template.git\n   cd langgraph-gradio-template\n   ```\n\n6. **Install dependencies with Poetry**\n   ```bash\n   poetry install\n   ```\n\n7. **Run the application**\n   ```bash\n   poetry run python app.py\n   ```\n\n---\n\n## Basic Gradio Integration\n\nGradio expects a function that accepts a `(user_message, chat_history)` and returns an updated `chat_history` and an empty input string. In this template, we use the LangGraph app inside a `chat_fn` to process user input and return results:\n\n```python\ndef chat_fn(message, history):\n    session_id = \"session-123\"\n\n    result = graph_app.invoke(\n        {\"messages\": [HumanMessage(content=message)]},\n        config={\"configurable\": {\"thread_id\": session_id}}\n    )\n\n    response = result[\"messages\"][-1].content\n    history.append((message, response))\n    return history, \"\"\n```\n\nWe then define a simple Gradio interface using [Blocks](https://www.gradio.app/docs/gradio/blocks):\n\n```python\nwith gr.Blocks() as demo:\n    gr.Markdown(\"### LangGraph Chat with Gradio\")\n    chatbot = gr.Chatbot()\n    msg = gr.Textbox(label=\"Type your message\")\n    send_btn = gr.Button(\"Send\")\n\n    send_btn.click(fn=chat_fn, inputs=[msg, chatbot], outputs=[chatbot, msg])\n```\n\nThis creates a basic UI with:\n- A `Chatbot` display area\n- A `Textbox` for input\n- A `Send` button to trigger message handling\n\n\u003e Note: The tools in this template are placeholders. For example, you can ask it about the weather, but the response is hard-coded rather than coming from a real weather API.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssgrummons%2Flanggraph-gradio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fssgrummons%2Flanggraph-gradio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fssgrummons%2Flanggraph-gradio/lists"}