IntentLayerDocsDashboard ↗
Docs/SDKs
SDKs

SDK safety contract

Exact failure isolation, fallback, logging, timeout, wrapper, and mode behavior in both SDKs.

SDK network boundary does not throw into host application. Configuration programming errors can still throw.

#Gate fallback

GateResult(
    ambiguity_score=0.0,
    dimensions={},
    questions=[],
    intent_spec=None,
)

Python catches all exceptions around HTTP and parse. TypeScript catches post and response-parse errors in gate. Both treat failure as clear/pass-through.

#Telemetry

Python sends outcome in daemon thread. TypeScript starts promise and attaches catch. Neither waits for delivery or retries. Failed telemetry is dropped.

#Logging

Python uses logger intentlayer at debug level. TypeScript logs only when DEBUG contains intentlayer or *.

#Timeouts

Python internal timeout is 8.0 seconds and is not publicly configurable. TypeScript timeoutMs defaults to 8000 and aborts fetch.

#Wrapper behavior

Wrappers gate then always invoke original agent. Core SDK mode does not intercept, rewrite, or return questions. Python wrapper preserves sync/async shape; TypeScript wrapper always returns promise.

#Errors that still throw

  • Python init invalid mode → ValueError.
  • TypeScript constructor invalid mode → TypeError.
  • OpenAI adapter missing chat.completions.createTypeError.
  • Host agent errors propagate normally.

hide observability loss. Monitor backend separately.

Source truthsdk/intentlayer/client.pysdk-js/src/index.tssdk/tests/test_sdk.pysdk-js/tests/client.test.ts