SDKs
Clients talk to a running Kev server (POST /v1/systemone). Published packages:
npm install @kev-ai/sdk
pip install kevTypeScript
import { Choice, KevClient, Noul, Score } from "@kev-ai/sdk";
const client = new KevClient({ baseUrl: "http://127.0.0.1:3000" });
const res = await client.systemOne({
state: "Package stuck in transit for a week. Tracking frozen.",
questions: {
topic: Choice("Which team?", {
billing: "charges",
shipping: "delivery / tracking",
technical: "bugs",
}),
severity: Score("How urgent?", [
"can wait",
"this week",
"today",
"right now",
]),
escalate: Noul("Page a human?"),
},
});
if (res.answers.escalate.noul > 0.7) routeToHuman();
else assign(res.answers.topic.choice);Adapters (same package)
import { createLangChainKevTool } from "@kev-ai/sdk/langchain";
import { createLlamaIndexKevTool } from "@kev-ai/sdk/llamaindex";Python
from kev import KevClient, Choice, Noul
client = KevClient(base_url="http://127.0.0.1:3000")
res = client.system_one(
state="Charged twice. Furious.",
questions={
"topic": Choice("Which team?", {
"billing": "charges",
"technical": "bugs",
}),
"escalate": Noul("Escalate now?"),
},
)
print(res.answers["topic"].choice, res.answers["escalate"].noul)Source: github.com/arjun988/Kev