Skip to main content

SDK overview

Availability

Open core · self-host + all Splyntra Cloud plans

Splyntra has two first-class SDKs — one for Python, one for TypeScript / JavaScript — and both are Apache-2.0, so you can embed them freely in any project, including closed-source and commercial ones. They speak the same OTLP endpoint, so you can mix languages across a fleet and see every run in the same dashboard.

PythonTypeScript / JavaScript
Packagepip install splyntranpm install @splyntra/sdk
InitSplyntra(...) (snake_case)new Splyntra({...}) (camelCase)
RuntimeNode.js ≥ 18, ESM or CommonJS
LicenseApache-2.0Apache-2.0
ReferencePython SDKTypeScript SDK

Install

pip install splyntra
# with framework extras:
pip install "splyntra[langgraph,openai]"

Auto-instrumentation vs. manual

There are two ways to capture spans, and you can combine them.

  • Auto-instrumentation — pass an instrument list at init and Splyntra patches your frameworks and providers so every step, model call, and tool invocation is captured with no per-call changes. This is the default path and covers most agents.
  • Manual instrumentation — wrap or decorate your own functions with @trace_agent/@trace_tool/@trace_llm (Python) or wrapAgent/wrapTool/wrapLLM and decorators (TypeScript) when you have custom code outside a supported framework. See Manual instrumentation.

The instrument list

Set instrument to the frameworks and providers you use. Each instrumentor is a safe no-op when its target package is not installed, so listing extras you do not have is harmless.

instrument nameCapturesNotes
openaiChat completions → llm_callAlso covers OpenAI-compatible providers via base_url
anthropicMessages → llm_call
ollamaGenerate/chat → llm_call
langgraphGraph run → agent, nodes → step
openai_agents / openai-agentsRunner.runagent
crewaiKickoff → agent, tasks → step, tools → tool_call
mcptools/calltool_call
llamaindexQuery → agent, retriever → retrieval
chromaQuery/get → vector_search
google_adkAgent runs → agent / tool_callPython only
pydantic_aiAgent runs → agentPython only

Only openai, langgraph, openai-agents, and crewai ship a pip extra; the rest instrument whatever is already in your environment. See Framework integrations and LLM providers.

When to use each

Use the SDK when…Send raw OTLP when…
You write Python or TypeScript and want auto-instrumentation, the inline guard, logs, eval, and governance helpers in one package.You already emit OpenTelemetry from another language or an out-of-process platform.

For raw OpenTelemetry, point your exporter at the collector — see Ingest & OTLP. For no-SDK platforms like Dify and n8n, see Agent platforms.

Next steps