Bluwing/Docsv0.9.0
Operational
API ReferenceConsole

Get started

  • Introduction
  • Quickstart
  • How it works

Build

  • Tool format
  • Matching hints
  • Toolsets and builds
  • Versions and live

Call

  • Resolve a request
  • Reading responses
  • OpenAI and Anthropic compatibility

Account

  • Authentication
  • Credits and billing
  • Limits
  • Errors
  • Security and data
  • FAQ

Get started

How it works

What happens between the text going in and the calls coming out.

Bluwing transforms natural language instructions into validated, grounded tool calls through pre-compiled brick indices, sub-millisecond graph traversal, and dynamic tool masking. Understanding this pipeline helps you design sharper tool descriptions and diagnose routing behavior.

Fast-path semantic routing bypasses heavy LLM passes

#The Resolution Pipeline

Every resolution request passes through four deterministic stages:

01
Schema Validation & Hashing

Computes canonical tool names and 32-byte content hashes

↓
02
Automatic Target Resolution

Matches existing ready bricks in <1ms or compiles JIT via Kiln

↓
03
MASON Hierarchical Retrieval

Traverses AVX2 SIMD vector index with dynamic tool masking

↓
04
MORTAR Parameter Grounding

Binds typed arguments via Sinkhorn-Knopp bijective alignment

1. Schema Validation & Hashing

When you pass inline tools with model: "bluwing", the gateway immediately validates your schemas and computes canonical 32-byte content hashes:

  • Tools are sorted deterministically by name.
  • Hash accounts for function signatures, descriptions, parameters, and required arrays.
  • Matching against existing ready bricks completes in under 1 millisecond.

2. Dynamic Tool Masking & Subsets

You don't need to rebuild an index for every minor variation of tools:

  • If your request passes 3 tools that belong to a pre-compiled 70-tool brick, Bluwing executes on the pre-compiled brick with zero compilation delay (35 ms).
  • Non-passed tools are strictly masked from candidate generation and parameter extraction. The model cannot hallucinate or emit unpassed tools.
  • If the tools are completely novel, Bluwing compiles an ephemeral brick Just-In-Time (JIT) and resolves the request within the same call.

3. Split & Candidate Retrieval (MASON)

Compound user sentences often require multiple operations. For example:

"Find the invoice for Acme Corp and post a summary to #finance"

MASON (C++23) decomposes the prompt and walks hierarchical vector clusters:

  • Evaluates candidate tools using AVX2 SIMD dot products and BM25 Okapi lexical scoring.
  • Calibrates probabilities via Platt scaling and EVT Weibull tail thresholds.
  • If confidence falls below the deadband, it returns no_tool to prevent false positives.

4. Parameter Extraction & Grounding (MORTAR)

For each selected tool, arguments are parsed from the prompt and supplied facts:

  • Strict Typing: Values are validated against JSON Schema types and enums.
  • Bijective Parameter Grounding: Uses Sinkhorn-Knopp optimal transport to associate tokens with argument slots.
  • Temporal Normalization: Relative dates like "tomorrow at 3pm" resolve to ISO timestamps.
  • Zero Hallucination Guarantee: Arguments must be grounded in user words or supplied facts. Missing required arguments trigger needs_input rather than an invented value.

#Traditional LLM Calling vs. Bluwing Engine

MetricTraditional LLM Tool CallingBluwing Compiled Engine
Tool Definition Tokens5,000 to 25,000+ tokens per conversational turn0 tokens (compiled into high-speed index)
Token Cost$0.02 – $0.08 per turn ($20 – $80 per 1,000 turns)$0.015 per 1,000,000 input tokens (~$0.0003 per 1,000 turns)
Execution Latency800 ms – 2,500 ms18 ms – 40 ms
Compilation LatencyN/A54 ms (30 tools) to 1.08s (70 tools) via parallel Perplexity embeddings
Scaling LimitDegrades sharply past 20–30 toolsScales cleanly to 10,000+ tools per brick
Dynamic Tool MaskingRequires resending filtered schemas into promptInstant zero-overhead masking ($T_{\text{in}} \subseteq T_{\text{brick}}$)
Hallucination RiskModels frequently invent missing argumentsZero hallucination: Missing values trigger needs_input
Argument ProvenanceOpaque black boxGrounding trace: Exact character offsets for every argument

#Dependency Graphs & Sequential Calls

When a compound request contains steps that depend on each other, Bluwing returns them with dependency ordering:

  • Independent calls (e.g. fetching weather and checking calendar) are returned together with parallel: true.
  • Dependent calls (e.g. creating a customer record then creating an order with the returned customer_id) list the prerequisite call in depends_on.
01
Step 1: customers.create

Generates call_01 with name and email

↓
02
Dependency Link

call_02 requires customer_id produced by call_01

↓
03
Step 2: orders.create

Listed in pending until call_01 yields customer_id

#What Bluwing Does Not Do

  • Does Not Run Tools: Bluwing returns the structured JSON call objects; your backend executes them with your own credentials and databases.
  • Does Not Store Conversational State: Each turn is stateless. Contextual session details should be passed via facts.
  • Does Not Generate Chat Output: Your existing LLM or frontend handles user conversational replies.
PreviousQuickstartNext Tool format

Something unclear or missing? Write to [email protected] and we'll fix the page.

On this page

  • The Resolution Pipeline
  • Traditional LLM Calling vs. Bluwing Engine
  • Dependency Graphs & Sequential Calls
  • What Bluwing Does Not Do