Skip to content

LangChain & LangGraph (BipkitClassifier)

BipkitClassifier provides a clean typed interface for calling https://api.bipkit.io/api/v1/evaluate from Python agent workflows.

Terminal window
pip install "bipkit[langchain]"

(See the Official SDKs hub for interim GitHub install instructions while PyPI org approval completes.)

Set BIPKIT_API_KEY in your environment (or pass api_key="..." explicitly) and invoke BipkitClassifier:

from bipkit.integrations.langchain import BipkitClassifier, Noul, Score, Choice
# Reads BIPKIT_API_KEY from environment by default
classifier = BipkitClassifier(engine="bip-instant")
response = classifier.invoke({
"state": "CPU usage is at 99% and incoming web requests are timing out",
"evaluations": {
"urgent": Noul(instructions="Urgent critical issue requiring immediate attention"),
"severity": Score(levels=["low", "medium", "high", "critical"]),
"domain": Choice(choices=["infrastructure", "sales", "billing"]),
},
})
print("Urgent P(true):", response.nouls["urgent"].noul)
print("Severity level:", response.scores["severity"].level)
print("Domain choice:", response.choices["domain"].top_choice)