🦜️🧰 langchain-dev-utils
🚀 High-efficiency toolkit designed for LangChain and LangGraph developers
This is the English version. For the Chinese version, please visit 中文版本
✨ Why choose langchain-dev-utils?
Tired of writing repetitive code in LangChain development? langchain-dev-utils is the solution you need! This lightweight yet powerful toolkit is designed to enhance the development experience of LangChain and LangGraph, helping you:
- ⚡ Boost development efficiency - Reduce boilerplate code, allowing you to focus on core functionality
- 🧩 Simplify complex workflows - Easily manage multi-model, multi-tool, and multi-agent applications
- 🔧 Enhance code quality - Improve consistency and readability, reducing maintenance costs
- 🎯 Accelerate prototype development - Quickly implement ideas, iterate and validate faster
🎯 Core Features
- 🔌 Unified model management - Specify model providers through strings, easily switch and combine different models
- 💬 Flexible message handling - Support for chain-of-thought concatenation, streaming processing, and message formatting
- 🛠️ Powerful tool calling - Built-in tool call detection, parameter parsing, and human review functionality
- 🤖 Efficient Agent development - Simplify agent creation process, expand more common middleware
- 📊 Convenient State Graph Construction - Provides pre-built functions to easily create sequential or parallel state graphs
⚡ Quick Start
This library is primarily used to connect to models that expose an OpenAI-Compatible API. The example below uses a qwen2.5-7b model served by vLLM.
1. Install langchain-dev-utils
pip install -U "langchain-dev-utils[standard]"
Note: This feature requires installing langchain-dev-utils[standard].
2. Start using
from langchain.tools import tool
from langchain_core.messages import HumanMessage
from langchain_dev_utils.chat_models import register_model_provider, load_chat_model
from langchain_dev_utils.agents import create_agent
# Register model provider
register_model_provider("vllm", "openai-compatible", base_url="http://localhost:8000/v1")
@tool
def get_current_weather(location: str) -> str:
"""Get the current weather for the specified location"""
return f"25 degrees, {location}"
# Dynamically load model using string
model = load_chat_model("vllm:qwen2.5-7b")
response = model.invoke("Hello")
print(response)
# Create agent
agent = create_agent("vllm:qwen2.5-7b", tools=[get_current_weather])
response = agent.invoke({"messages": [HumanMessage(content="What's the weather like in New York today?")]})
print(response)
For more features of this library, please visit the full documentation
🛠️ GitHub Repository
Visit the GitHub repository to view the source code and report issues.
Developed with ❤️ and ☕
If this project helps you, please give us a ⭐️
Metadata
Release files for langchain-dev-utils 1.4.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| langchain_dev_utils-1.4.6.tar.gz | 276.7 kB | Without provenance | Details for langchain_dev_utils-1.4.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| langchain_dev_utils-1.4.6-py3-none-any.whl | Python 3 | none | any | Details for langchain_dev_utils-1.4.6-py3-none-any.whl |
Total release size: 334.3 kB
Release files / langchain_dev_utils-1.4.6.tar.gz
| Download URL | langchain_dev_utils-1.4.6.tar.gz |
|---|---|
| Size | 276.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc23d7d9b693057758c400911708d437f093898284ec1021a433a1d9bf844751
|
|
BLAKE2b-256 checksum How to use checksums |
88bffc93dfe2b52e9ab18966111e84e9e35f728c6e4c649be9790d341fe8014e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / langchain_dev_utils-1.4.6-py3-none-any.whl
| Download URL | langchain_dev_utils-1.4.6-py3-none-any.whl |
|---|---|
| Size | 57.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
251d93bff34898cf557fc400a3b0cac740c006b9375c49f10f4440cfe7ef99bb
|
|
BLAKE2b-256 checksum How to use checksums |
7f5472a44863ff490ab39738f18864c16563d7e0d9aca40c66b5a121778a4a63
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for langchain-dev-utils 1.4.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.