{"name":"agent-service-toolkit: A Comprehensive Toolkit for AI Agent Services with LangGraph","description":"The agent-service-toolkit is a full-featured repository for building and running AI agent services. It leverages LangGraph for sophisticated agent logic, FastAPI for a robust service API, and Streamlit for an interactive chat interface. This toolkit provides a comprehensive and robust template for developing and deploying custom AI agents with ease.","github":"https://github.com/JoshuaC215/agent-service-toolkit","url":"https://osrepos.com/repo/joshuac215-agent-service-toolkit","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/joshuac215-agent-service-toolkit","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/joshuac215-agent-service-toolkit.md","json":"https://osrepos.com/repo/joshuac215-agent-service-toolkit.json","topics":["agents","langgraph","streamlit","python","ai","fastapi","machine-learning"],"keywords":["agents","langgraph","streamlit","python","ai","fastapi","machine-learning"],"stars":null,"summary":"The agent-service-toolkit is a full-featured repository for building and running AI agent services. It leverages LangGraph for sophisticated agent logic, FastAPI for a robust service API, and Streamlit for an interactive chat interface. This toolkit provides a comprehensive and robust template for developing and deploying custom AI agents with ease.","content":"## Introduction\n\nThe `agent-service-toolkit` by JoshuaC215 offers a complete solution for running AI agent services. Built with LangGraph, FastAPI, and Streamlit, it provides everything needed from agent definition to a user-friendly chat interface. This project serves as an excellent template for developers looking to quickly build and deploy their own agents using the LangGraph framework, demonstrating a full, robust setup.\n\nKey components include a LangGraph agent, a FastAPI service to serve it, a client for interaction, and a Streamlit application for a chat interface. Data structures and settings are meticulously built with Pydantic, ensuring reliability and ease of use.\n\n## Installation\n\nGetting started with `agent-service-toolkit` is straightforward, with options for both Python virtual environments and Docker.\n\n### Quickstart with Python\n\n1.  **Set up environment variables**: Create a `.env` file in the root directory with at least one LLM API key (e.g., `OPENAI_API_KEY=your_openai_api_key`).\n2.  **Install dependencies**: Use `uv` (recommended) or `pip`.\n    sh\n    curl -LsSf https://astral.sh/uv/0.7.19/install.sh | sh\n    uv sync --frozen\n    source .venv/bin/activate\n    \n3.  **Run the service**: In one terminal:\n    sh\n    python src/run_service.py\n    \n4.  **Run the Streamlit app**: In another terminal:\n    sh\n    source .venv/bin/activate\n    streamlit run src/streamlit_app.py\n    \n\n### Quickstart with Docker\n\n1.  **Set up environment variables**: Create a `.env` file with your `OPENAI_API_KEY`.\n    sh\n    echo 'OPENAI_API_KEY=your_openai_api_key' >> .env\n    \n2.  **Launch services**: Ensure Docker and Docker Compose (>= v2.23.0) are installed.\n    sh\n    docker compose watch\n    \n    This command will automatically start the PostgreSQL database, the FastAPI agent service, and the Streamlit app. Services will update automatically on code changes.\n\n## Examples\n\nThe repository includes a generic `src/client/client.AgentClient` for interacting with the agent service. Here's a quick example of how to use it:\n\npython\nfrom client import AgentClient\nclient = AgentClient()\n\nresponse = client.invoke(\"Tell me a brief joke?\")\nresponse.pretty_print()\n# Expected Output:\n# ================================== Ai Message ==================================\n#\n# A man walked into a library and asked the librarian, \"Do you have any books on Pavlov's dogs and Schrödinger's cat?\"\n# The librarian replied, \"It rings a bell, but I'm not sure if it's here or not.\"\n\n\n## Why Use It\n\n`agent-service-toolkit` stands out due to its comprehensive feature set and robust architecture:\n\n*   **LangGraph Agent and Latest Features**: Implements LangGraph v1.0 features, including human-in-the-loop with `interrupt()`, flow control with `Command`, long-term memory with `Store`, and `langgraph-supervisor`.\n*   **FastAPI Service**: Provides both streaming and non-streaming endpoints for serving agents efficiently.\n*   **Advanced Streaming**: Features a novel approach supporting both token-based and message-based streaming.\n*   **Streamlit Interface**: Offers a user-friendly chat interface with voice input and output capabilities.\n*   **Multiple Agent Support**: Allows running and calling multiple agents by URL path, with available agents and models described in `/info`.\n*   **Asynchronous Design**: Utilizes async/await for efficient handling of concurrent requests.\n*   **Docker Support**: Includes Dockerfiles and a `docker compose` file for easy development and deployment.\n*   **Testing**: Comes with robust unit and integration tests for the entire repository.\n\n## Links\n\n*   **GitHub Repository**: [https://github.com/JoshuaC215/agent-service-toolkit](https://github.com/JoshuaC215/agent-service-toolkit \"agent-service-toolkit GitHub Repository\" target=\"_blank\")\n*   **Streamlit App**: [https://agent-service-toolkit.streamlit.app/](https://agent-service-toolkit.streamlit.app/ \"Live Streamlit App\" target=\"_blank\")\n*   **Video Walkthrough**: [https://www.youtube.com/watch?v=pdYVHw_YCNY](https://www.youtube.com/watch?v=pdYVHw_YCNY \"Video Walkthrough\" target=\"_blank\")","metrics":{"detailViews":2,"githubClicks":2},"dates":{"published":null,"modified":"2026-03-17T01:31:29.000Z"}}