> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bitfab.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Reference Overview

> Dense, canonical API reference. No tutorials - signatures, types, and semantics only.

This section is a **pure reference** - exhaustive signatures, parameters, return values, and semantics for every public API across every Bitfab SDK. No narrative, no "how to use", no walkthroughs.

For tutorials and getting started, see the individual SDK guides:
[TypeScript](/typescript-sdk), [Python](/python-sdk), [Ruby](/ruby-sdk), [Go](/go-sdk).

## Pages

* [TypeScript SDK Reference](/reference/typescript) - `bitfab` npm package
* [Python SDK Reference](/reference/python) - `bitfab-py` PyPI package
* [Ruby SDK Reference](/reference/ruby) - `bitfab` RubyGem
* [Go SDK Reference](/reference/go) - `github.com/Project-White-Rabbit/bitfab-go` module
* [Span Types](/reference/span-types) - common `SpanType` enum
* [HTTP Endpoints](/reference/http) - trace ingestion and lookup endpoints the SDKs call

## Framework Integrations

Per-framework signatures (handlers, processors, wrappers) are documented in the **[Frameworks](/frameworks/overview)** section. Language-specific signatures are mirrored in each SDK reference's **Framework Integrations** subsection.

| Framework                                        | TypeScript reference                                                                                                                                  | Python reference                                                                                                                                    | Ruby |  Go |
| ------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- | :--: | :-: |
| [LangGraph / LangChain](/frameworks/langgraph)   | [`getLangGraphCallbackHandler`](/reference/typescript#framework-integrations)                                                                         | [`get_langgraph_callback_handler`](/reference/python#framework-integrations)                                                                        |   -  |  -  |
| [OpenAI Agents SDK](/frameworks/openai-agents)   | [`getOpenAiTracingProcessor`](/reference/typescript#framework-integrations) + [`getOpenAiAgentHandler`](/reference/typescript#framework-integrations) | [`get_openai_tracing_processor`](/reference/python#framework-integrations) + [`get_openai_agent_handler`](/reference/python#framework-integrations) |   -  |  -  |
| [BAML](/frameworks/baml)                         | [`wrapBAML`](/reference/typescript#wrapbaml)                                                                                                          | [`wrap_baml`](/reference/python#wrap-baml)                                                                                                          |   -  |  -  |
| [Claude Agent SDK](/frameworks/claude-agent-sdk) | [`getClaudeAgentHandler`](/reference/typescript#framework-integrations)                                                                               | [`get_claude_agent_handler`](/reference/python#framework-integrations)                                                                              |   -  |  -  |
| [Vercel AI SDK](/frameworks/vercel-ai-sdk)       | [`getVercelAiMiddleware`](/reference/typescript#framework-integrations)                                                                               | -                                                                                                                                                   |   -  |  -  |

## Invariants Across SDKs

Behavior that is guaranteed to match across all SDKs:

| Invariant               | Behavior                                                                                                  |
| ----------------------- | --------------------------------------------------------------------------------------------------------- |
| Empty / missing API key | Tracing disabled, warning logged, wrapped functions still execute, no spans sent, no errors thrown        |
| `enabled: false`        | Same as above - wrapped functions pass through unwrapped                                                  |
| Span dispatch           | Fire-and-forget. Errors in span transport never propagate to host code                                    |
| Nested spans            | Child spans inherit `traceId`; parent-child relationships tracked via context                             |
| Trace ID                | UUID v4. Generated at root span, inherited by descendants                                                 |
| Span ID                 | UUID v4. Unique per span                                                                                  |
| Root span               | The outermost span in a call tree. Emits trace completion signal when it ends                             |
| Errors in user code     | Captured on the span (`error` field) then re-raised/re-thrown                                             |
| Default `serviceUrl`    | `https://bitfab.ai`                                                                                       |
| Default span `type`     | `"custom"`. A label only; does not affect tracing, replay, or evaluation                                  |
| `addContext`            | Each call appends one entry. Multiple calls accumulate                                                    |
| `setPrompt`             | Metadata only; does not change what the span executes. Last write wins. Calling outside a span is a no-op |
| `setSessionId`          | Stored as a DB column on the trace. Filterable in dashboard                                               |
| `setMetadata`           | Merges with existing metadata. Later values win per-key                                                   |

## Common Span Types

Every SDK accepts the same enum for span type:

```
"llm" | "agent" | "function" | "guardrail" | "handoff" | "custom"
```

See [Span Types](/reference/span-types) for full semantics.
