Official SDKs
Bipkit maintains four official, strongly typed public SDKs targeting https://api.bipkit.io. Every SDK shares the same production reliability guarantees: automatic BIPKIT_API_KEY environment detection, exponential backoff with jitter on 429 / 5xx, Retry-After handling, typed errors, and built-in Decision-Safety escalation helpers.
SDK Overview
Section titled “SDK Overview”| Language | Package / Module | Install Command | Min Runtime | Registry & Repository |
|---|---|---|---|---|
| TypeScript / JS | @bipware-org/bipkit |
npm install @bipware-org/bipkit |
Node 18+, Bun, Deno, Edge | npm · GitHub |
| Go | github.com/bipware-org/bipkit-go |
go get github.com/bipware-org/bipkit-go@v0.1.0 |
Go 1.22+ | pkg.go.dev · GitHub |
| Rust | bipkit |
cargo add bipkit |
Rust 1.75+ (2021) | crates.io · GitHub |
| Python | bipkit (+ bipkit[langchain], bipkit[dpl]) |
pip install bipkit |
Python 3.10+ | GitHub (PyPI pending) |
Quickstart
Section titled “Quickstart”Set your API key in your environment (export BIPKIT_API_KEY="bpk_live_...") and run a single-question decision with automatic escalation gating:
npm install @bipware-org/bipkitimport { Bipkit, shouldEscalate } from "@bipware-org/bipkit";
// Reads process.env.BIPKIT_API_KEY by defaultconst bipkit = new Bipkit();
const decision = await bipkit.decide({ state: "Customer wants to cancel their enterprise plan and requests a refund.", choices: [ { id: "billing_retention", label: "Billing & Retention" }, { id: "technical_support", label: "Technical Support" }, { id: "sales_inquiry", label: "Sales Inquiry" }, ], engine: "bip-cascade",});
console.log("Top choice:", decision.top_choice);if (shouldEscalate(decision)) { console.log("Low confidence — escalate to System Two LLM");}pip install bipkit# Optional extras:# pip install "bipkit[langchain]"# pip install "bipkit[dpl]"from bipkit import Bipkit, should_escalate
# Reads BIPKIT_API_KEY from environment by defaultclient = Bipkit()
decision = client.decide( state="Customer wants to cancel their enterprise plan and requests a refund.", choices=[ {"id": "billing_retention", "label": "Billing & Retention"}, {"id": "technical_support", "label": "Technical Support"}, {"id": "sales_inquiry", "label": "Sales Inquiry"}, ], engine="bip-cascade",)
print("Top choice:", decision.top_choice)if should_escalate(decision): print("Low confidence — escalate to System Two LLM")go get github.com/bipware-org/bipkit-go@v0.1.0package main
import ( "context" "fmt" "log"
bipkit "github.com/bipware-org/bipkit-go")
func main() { // Reads BIPKIT_API_KEY from the environment by default client := bipkit.NewClient()
res, err := client.Decide(context.Background(), bipkit.DecisionRequest{ State: "Customer wants to cancel their enterprise plan and requests a refund.", Engine: "bip-cascade", Choices: []any{ bipkit.Candidate{ID: "billing_retention", Label: "Billing & Retention"}, bipkit.Candidate{ID: "technical_support", Label: "Technical Support"}, bipkit.Candidate{ID: "sales_inquiry", Label: "Sales Inquiry"}, }, }) if err != nil { log.Fatal(err) }
if res.TopChoice != nil { fmt.Println("Top choice:", *res.TopChoice) } if bipkit.ShouldEscalateDecision(res, bipkit.EscalationOptions{MinConfidenceTier: "medium"}) { fmt.Println("Low confidence — escalate to System Two LLM") }}cargo add bipkit serde_json tokio --features tokio/fulluse bipkit::{BipkitClient, Candidate, DecisionRequest, EscalationOptions, should_escalate_decision};use serde_json::json;
#[tokio::main]async fn main() -> Result<(), bipkit::BipkitError> { // Reads BIPKIT_API_KEY from environment by default let client = BipkitClient::from_env()?;
let decision = client .decide(&DecisionRequest { state: "Customer wants to cancel their enterprise plan and requests a refund.".into(), choices: vec![ json!(Candidate { id: "billing_retention".into(), label: Some("Billing & Retention".into()), description: None }), json!(Candidate { id: "technical_support".into(), label: Some("Technical Support".into()), description: None }), json!(Candidate { id: "sales_inquiry".into(), label: Some("Sales Inquiry".into()), description: None }), ], engine: Some("bip-cascade".into()), top_k: None, temperature: None, }) .await?;
println!("Top choice: {:?}", decision.top_choice); if should_escalate_decision(&decision, &EscalationOptions::default()) { println!("Low confidence — escalate to System Two LLM"); } Ok(())}Enterprise Reliability & Feature Matrix
Section titled “Enterprise Reliability & Feature Matrix”All four SDKs are designed for low-latency production pipelines and share consistent operational defaults:
| Capability | TypeScript | Python | Go | Rust |
|---|---|---|---|---|
| Runtime Dependencies | Zero (native fetch) |
httpx, pydantic |
Zero (net/http) |
reqwest (rustls-tls), tokio |
| Auto Env Detection | BIPKIT_API_KEY, BIPKIT_BASE_URL |
BIPKIT_API_KEY, BIPKIT_BASE_URL |
BIPKIT_API_KEY, BIPKIT_BASE_URL |
BIPKIT_API_KEY, BIPKIT_BASE_URL |
| Retries & Backoff | Exponential + jitter (429 / 5xx) |
Exponential + jitter (429 / 5xx) |
Exponential + jitter (429 / 5xx) |
Exponential + jitter (429 / 5xx) |
Retry-After Header |
Honored automatically | Honored automatically | Honored automatically | Honored automatically |
| Typed Errors | RateLimitError, AuthenticationError, … |
RateLimitError, AuthenticationError, … |
*bipkit.APIError + IsRateLimitError(err) |
BipkitError::RateLimit, Authentication, … |
| Decision-Safety Helper | shouldEscalate() |
should_escalate() |
ShouldEscalateDecision() |
should_escalate_decision() |
| Full API Surface | Evaluate, Decide, Feedback, Engines, Keys, Usage, DPL | Evaluate, Decide, Feedback, Engines, Keys, Usage, DPL + Async | Evaluate, Decide, Feedback, Engines, Keys, Usage, DPL | Evaluate, Decide, Feedback, Engines, Keys, Usage, DPL |
| Agent / DPL Extras | Edge / Workers ready | bipkit[langchain], bipkit[dpl] |
Context-first concurrency | dpl-verify Cargo feature |
Next Steps
Section titled “Next Steps”- Run Your First Evaluation — multi-dimensional
noul,score, andchoiceevaluation in one call. - Decision-Safety & Escalation Guide — configure
min_confidence_tier,max_entropy, andmin_marginthresholds. - Error Format & Status Codes — handle typed SDK exceptions and rate limits cleanly.
- LangChain & LangGraph Integrations — drop-in Python classifier, model router, and tool guardrail middleware.
