JoshuaC215/agent-service-toolkit
Self-host LangGraph agents with a FastAPI service and a Streamlit chat UI
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
The toolkit separates the agent graph, service API, Python client, and chat UI. Graphs live in src/agents/ and are registered in src/agents/agents.py. FastAPI serves the selected graph by URL path through src/service/service.py; /info exposes available agents and models. Pydantic defines protocol data and settings, with protocol types in src/schema/ and model definitions and settings in src/core/.
The service uses async request handling. AgentClient in src/client/client.py exposes synchronous and asynchronous calls, with and without streaming, and the bundled Streamlit app uses that client rather than running the graphs directly. A separate frontend can also use the per-agent AG-UI endpoint. Registration is a code-level extension: adding a graph means defining it and updating the registry.
Key Capabilities & Differentiators
The LangGraph examples cover human review with interrupt(), routing with Command, long-term memory with Store, and supervision via langgraph-supervisor. FastAPI exposes token-level and message-level streaming as well as non-streaming invocation. /threads lists a user's previous conversations by agent and drives Streamlit's Previous Chats sidebar. The UI also supports voice input and output, and its star ratings integrate with LangSmith.
Model inference can use external APIs or local serving via Ollama, vLLM, or SGLang; there is also a Vertex AI setup path. The basic ChromaDB retrieval agent requires the optional rag extra, and Safeguard content moderation requires a Groq API key. Optional smoke tests cover PostgreSQL and MongoDB checkpointers, AG-UI, and LangFuse tracing; the checkpointer tests verify that the selected backend is actually in use rather than silently falling back to SQLite.
Trade-offs & Limitations
Compared with wiring LangGraph directly into an existing backend, this toolkit gives a small team a tested starting point across the graph, API, client, and UI. If identity, persistence, and frontend delivery already exist in your stack, adopting the full template adds components and conventions you may not need. Streamlit is useful for validating a workflow quickly; the client and AG-UI endpoint let you replace it without replacing the graph service.
Compared with a managed agent platform, this is a source-level deployment you operate yourself. Review thread authorization, credential handling, database backups, and how deployments handle active streams before exposing it to multiple users. Unit and integration tests are included, but infrastructure-dependent smoke tests are opt-in rather than part of default CI. The MIT license is permissive; it does not settle model-provider terms or where prompts and traces are processed.
Hardware & Deployment Guide
Native setup requires Python 3.12 through 3.14 and at least one configured model backend in .env. Install with uv sync --frozen, then run python src/run_service.py and streamlit run src/streamlit_app.py in separate shells. Docker Compose v2.23.0 or newer supports the development watch workflow. It starts PostgreSQL 16, the API on port 8080, and Streamlit on port 8501; the API waits for PostgreSQL to pass its health check, and PostgreSQL uses a named volume.
Treat the Compose defaults as a development baseline: replace the default database credentials, restrict access to the mapped database port, and configure API authentication before exposing the service. docker compose watch handles source changes, but dependency changes require a rebuild. Remote inference keeps model compute off the service host; local inference must be sized separately for the selected model and concurrency. The package manifest lists version 0.1.0 and beta status, with no GitHub release listed to establish an upgrade history.
src/agents/agents.py; discover available agents and models via /info.interrupt() for human review, Command for flow control, Store for long-term memory, and langgraph-supervisor./threads; star ratings integrate with LangSmith.rag extra.Teams building a self-hosted LangGraph assistant that want to validate graph behavior, streaming, conversation history, and a working chat UI before investing in a custom frontend.
You need a turnkey managed product, or your existing platform already provides the API, identity, persistence, and UI layers and only needs a graph runtime.
Quick Start & Installation
# At least one LLM API key is required echo 'OPENAI_API_KEY=your_openai_api_key' >> .env # uv is the recommended way to install agent-service-toolkit, but "pip install ." also works # For uv installation options, see: https://docs.astral.sh/uv/getting-started/installation/ curl -LsSf https://astral.sh/uv/0.13.5/install.sh | sh # Install dependencies. "uv sync" creates .venv automatically uv sync --frozen source .venv/bin/activate python src/run_service.py # In another shell source .venv/bin/activate streamlit run src/streamlit_app.py
Comparison vs. Top Agents & Frameworks Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| agent-service-toolkit ★ | 4.6k | +11 | Python | MIT | Self-host LangGraph agents with a FastAPI service and a Streamlit chat UI |
| deer-flow | 86.1k | +257 | Python | MIT | Self-hosted LangGraph agent runtime for long-running research, coding, and conte |
| hermes-agent | 268.1k | +1.5k | Python | MIT | Self-hosted Python agent with persistent memory and automation across chat and C |
| daily_stock_analysis | 75.9k | +896 | Python | MIT | A Python Agent workbench for multi-market watchlist research and scheduled repor |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/JoshuaC215/agent-service-toolkit.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about agent-service-toolkit
How do I expose a custom LangGraph agent to a separate frontend?
src/agents/ and register it in the agents dictionary in src/agents/agents.py. Discover agents and models through /info, then use the agent-specific invoke or stream endpoint. For a separate frontend, use AgentClient for Python integration or connect an AG-UI-compatible client to the agent's AG-UI endpoint.Does self-hosting require a GPU, and what should I size for?
Can I self-host this commercially under the MIT license?
When should I use this instead of integrating LangGraph directly or choosing a managed platform?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy