AI Agent Service Toolkit
A self-hosted foundation for serving LangGraph agents through FastAPI and Streamlit.
The evidence identifies major flows involving model providers, LangSmith, GitHub MCP, search, weather, databases, and deployment, and it provides a credential-file directory excluded from Git and Docker builds; the deployment workflow also declares contents: read. Frozen installation, a 14-day supply-chain cooldown, and constrained dependency ranges are positive, but the supplied evidence contains neither the lockfile nor vulnerability scanning or audit results. Human interruption is advertised, yet there is no proof that every effectful tool requires confirmation. The GitHub MCP tools' exact permissions, transmitted fields, and read/write behavior are not documented here. Docker shutdown is covered, but there is no general rollback for remote actions already performed by agents. Author, package metadata, and MIT copyright attribution are clear and consistent, justifying full source-attribution credit; registry non-verification is treated only as lack of independent identity confirmation.
The README, package configuration, workflows, and shown tests are broadly consistent about supported Python versions, agent loading, lazy initialization, and degradation when a token is absent or a connection fails. Tests cover not-loaded, nonexistent-agent, and missing-graph error states. Frozen dependencies, Docker support, multiple providers, several persistence backends, and optional end-to-end smoke scripts improve dependency resilience. Deductions remain because only a test subset is supplied, some real-infrastructure checks are excluded from default CI, GitHub MCP connection failure degrades to a tool-less agent, and the evidence does not show whether that failure is clearly surfaced to end users.
The intended audience and scenarios are explicit: developers building a LangGraph agent service with an API, client, and chat UI. Local Python, Docker, LangGraph Studio, multiple model providers, multiple agents, RAG, and alternative frontends are covered thoroughly. Named paths, /info, invoke/stream endpoints, and lazy loading provide reasonably precise activation boundaries, while missing credentials prevent GitHub MCP tools from loading. Full marks are withheld for capability boundaries and trigger precision because the exact permissions, input constraints, confirmation policy, and production safety limits of each agent and tool are not comprehensively enumerated.
The README has strong organization across overview, architecture, key files, quickstarts, Docker and local installation, client examples, customization, and specialist documentation. Both installation paths include actionable commands and version requirements. The MIT text, README, and package classifier agree, so licensing earns full credit. Beta status, optional integrations outside default CI, rebuild conditions, and the solo-maintainer cadence are disclosed, but there is no consolidated FAQ or complete production-limitations section. Naming is generally stable and the package has version 0.1.0, yet no changelog, release history, or compatibility policy is supplied. Maintenance ownership, triage cadence, and the maintenance-document location are explicit, although publisher identity is not independently verified.
The repository combines an agent graph, FastAPI service, synchronous and asynchronous client, streaming protocols, Streamlit UI, persistence, Docker, and testing scaffolding into a reusable template, providing substantial marginal value over an isolated agent example. Outputs are consumable through a chat UI, conventional and streaming APIs, and AG-UI. The evidence does not establish production-grade output structure, citations, error presentation, or quality controls across all agents. Local Ollama support and selective smoke tests can control cost, but the default stack has many substantial dependencies and may require model keys, databases, and optional observability services; no resource or monetary benchmarks are given, so cost-benefit is adequate rather than thorough.
Core claims can often be traced across the README, pyproject, workflows, and loading tests, including version bounds, deployment flow, lazy loading, and failure degradation. These sources offer useful corroboration, but strong phrases such as “full, robust toolkit,” “robust unit and integration tests,” and “latest features” are not fully established by the supplied test subset, and badges are not revision-pinned execution evidence. The documentation usefully distinguishes default CI from optional real-infrastructure smoke checks and discloses Beta and maintenance constraints, supporting fact/inference separation. Full credit is withheld because novelty and quality claims lack revision-specific measurements or complete supporting artifacts.
- GitHub MCP and other agent tools may produce remote read/write effects; review each tool's permission scope, transmitted parameters, confirmation gates, and audit trail before deployment.
- Do not treat fallback to a tool-less agent after connection failure as full success; verify that the service and UI clearly disclose degraded capability.
- The dependency surface is large, and the supplied evidence omits uv.lock and vulnerability results; validate the lockfile, transitive dependencies, and container images at this revision.
- Postgres, MongoDB, AG-UI, and LangFuse checks are optional rather than default CI; run and retain results for every integration actually deployed.
- Credential-directory exclusions are helpful, but verify that runtime logs, LangSmith/LangFuse tracing, feedback, and model-provider requests do not expose sensitive content.
What does this agent do, and when should you use it?
This repository is a complete Python template for building and operating LangGraph agent services rather than a single-purpose assistant. It combines several agent implementations, a FastAPI service, a reusable AgentClient, and a Streamlit chat application with text and voice interaction. The service supports streaming and non-streaming calls, selects agents by URL path, and exposes every agent through the AG-UI protocol for compatible frontends. Included examples cover human intervention, long-term memory, supervised multi-agent flows, moderation, basic ChromaDB RAG, conversation history, and LangSmith feedback. It can run in a local Python environment or as a Docker Compose stack containing PostgreSQL, the agent service, and the Streamlit application.
The service loads registered implementations from src/agents/ and serves them through the FastAPI application in src/service/service.py. Consumers call /<agent_name>/invoke for ordinary responses or /<agent_name>/stream for token- or message-oriented streaming; /info describes available agents and models, while /threads lists a user's prior conversations by agent. src/client/client.AgentClient wraps synchronous, asynchronous, streaming, and non-streaming requests, and src/streamlit_app.py uses that client to produce a chat UI with voice input and output, previous-chat navigation, and star feedback. The agent examples use LangGraph interrupt(), Command, Store, and langgraph-supervisor for human-in-the-loop execution, flow control, long-term memory, and supervised agent arrangements. Optional paths include a basic ChromaDB RAG agent, Safeguard moderation requiring a Groq API key, AG-UI endpoints, and PostgreSQL or MongoDB checkpoint backends.
- A Python team evaluating LangGraph can start with an integrated agent, HTTP service, client, and chat UI instead of assembling each layer independently.
- A backend developer hosting several specialized agents can register them in one FastAPI service and address each agent through its own URL path.
- An application team that needs responsive output can consume token- or message-based streams and build a custom frontend on AgentClient.
- An engineer designing approval gates, persistent memory, or supervised agent workflows can adapt the examples using interrupt(), Command, Store, and langgraph-supervisor.
- A team prototyping internal knowledge assistance can start with the included basic ChromaDB RAG implementation and its documented setup.
- A frontend team using CopilotKit or another AG-UI-compatible client can connect to the AG-UI endpoint exposed for each agent.
What are this agent's strengths and limitations?
- It covers the full path from LangGraph definitions through FastAPI serving and a reusable client to a working Streamlit interface, with both streaming and non-streaming access.
- It demonstrates LangGraph 1.0 mechanisms including interrupt(), Command, Store, and langgraph-supervisor for approvals, control flow, memory, and supervised agent systems.
- Every registered agent is also exposed through AG-UI, enabling compatible frontends such as CopilotKit, while AgentClient supports independently built applications.
- It documents both local Python and Docker Compose workflows and includes unit, integration, and opt-in end-to-end smoke tests.
- Operation requires at least one LLM API key or provider configuration, and Safeguard moderation adds a separate Groq API-key dependency.
- The Docker workflow runs PostgreSQL, FastAPI, and Streamlit services, making it heavier to operate than a single-process agent script.
- PostgreSQL, MongoDB, AG-UI, and LangFuse smoke tests are opt-in and are not exercised by the default CI run.
- The test suite currently has to be run through the local, non-Docker development setup.
- The repository is maintained by one person on a roughly biweekly triage cycle, so non-urgent responses may take one or two weeks.
How do you install or deploy this agent?
Prepare a Python environment and configure at least one LLM API key or provider connection. A documented quick start is:
git clone https://github.com/JoshuaC215/agent-service-toolkit.git
cd agent-service-toolkit
echo 'OPENAI_API_KEY=your_openai_api_key' >> .env
curl -LsSf https://astral.sh/uv/0.11.32/install.sh | sh
uv sync --frozen
source .venv/bin/activate
python src/run_service.pyIn another shell, run:
source .venv/bin/activate
streamlit run src/streamlit_app.pyAlternatively, create .env from .env.example and run docker compose watch. The documented container workflow requires Docker and Docker Compose 2.23.0 or later.
How do you use this agent?
After startup, open the Streamlit interface at the URL it reports, normally http://localhost:8501. The FastAPI service is available at http://0.0.0.0:8080, with API documentation at http://0.0.0.0:8080/redoc. A minimal client call is:
from client import AgentClient
client = AgentClient()
response = client.invoke("Tell me a brief joke?")
response.pretty_print()To add an agent, place its implementation in src/agents/, register it in the agents dictionary in src/agents/agents.py, and call /<your_agent_name>/invoke or /<your_agent_name>/stream. Adjust src/streamlit_app.py if the UI must reflect the new capabilities. Run pytest for the test suite; changes involving PostgreSQL, MongoDB, AG-UI, or LangFuse can be checked selectively with ./scripts/smoke_test.sh postgres, mongo, agui, or langfuse.