1. SubLogic Python SDK - compile decision schema & classify
python
from sublogic.sdk import AttributedInput, compile_query, execute_query
# 1. Compile schema with categorical choices & ordered priority scoring
query = compile_query({
"schema_version": "sublogic/v1",
"id": "agent-triage",
"questions": [
{
"id": "route_to",
"answer_type": "single",
"answers": [
{"id": "booking_agent", "label": "Booking Agent"},
{"id": "customer_support", "label": "Customer Support"},
{"id": "billing", "label": "Billing & Refunds"},
]
},
{
"id": "priority",
"answer_type": "ordered",
"answers": [
{"id": "low", "label": "Low", "score": 0.2},
{"id": "medium", "label": "Medium", "score": 0.5},
{"id": "high", "label": "High", "score": 0.9},
]
}
]
})
# 2. Execute decision in a single forward pass (~104ms, 0 tokens)
msg = "Book a flight to London by Friday and I'm a VIP member."
receipt = execute_query(query, input=AttributedInput(source_id="msg-1", text=msg))
# 3. Access winning choice and calibrated confidence
route = receipt.results["route_to"].winner # "booking_agent" (0.93)
priority = receipt.results["priority"].winner # "high" (0.84)
// SubLogic TypeScript SDK
// Status: Coming soon
// Package: @sublogic/sdk
// TypeScript client bindings for compileQuery() and executeQuery()
// with typed decision choices are currently in development.
// SubLogic .NET SDK
// Status: Coming soon
// Package: SubLogic.SDK (NuGet)
// C# client bindings for CompileQuery() and ExecuteQuery()
// with typed decision records are currently in development.
2. Gateway dispatch - route directly to specialized agent
python
# Dispatch immediately to specialized agent swarm (zero LLM orchestration tokens)
if route == "booking_agent":
agents.booking.dispatch(
user_message=msg,
priority=priority,
confidence=receipt.results["route_to"].distribution[route]
)