Installation
Quick Start
decimalai.init()
Initialize the SDK. Must be called once before any other method.
Your DecimalAI API key. Falls back to
DECIMAL_API_KEY environment variable.Backend URL. Override for self-hosted deployments.
Optional project grouping for multi-project workspaces.
Set
False to disable all tracing (useful in tests).Default agent name for all traces. Auto-detected from framework if not set.
Instrumentation flags
All instrumentation flags arebool, default False. Pass True to auto-instrument that surface. 8 framework integrations plus 3 direct LLM providers.
Framework integrations
Direct LLM providers — auto-trace raw SDK calls with no framework in between. Don’t combine a direct-provider flag with a framework flag that already traces the same provider (e.g.
openai with openai_agents or langchain) or the call is captured twice.
Other parameters
If
True (the default), init() synchronously probes the backend once to validate the API key and detect a wrong or unreachable base_url. Raises DecimalConfigError on a 401/403 or a connection failure — failing loud at init beats a silent day of background-send 401s. Pass verify=False in CI or cold-start-sensitive paths where the ~50–200ms probe is unacceptable.Seconds before the verify probe gives up. On timeout,
init() logs a warning and continues (does not raise), so a transiently slow backend doesn’t break startup.Flag form vs explicit
install() form. Passing a framework flag (langchain=True, openai_agents=True, …) is shorthand for init() + auto-running the matching install(). Use the explicit form only when you need to pass arguments to install(...) — e.g., install(agent=my_agent) for OpenAI Agents (full schema), or install(prompts={...}) for LangChain (override dynamic prompts). Don’t combine the two for the same framework — pick one or the other.Environment Variables
Zero-code setup — set env vars and run your script with no code changes:
What’s next
Tracing
Decorators and helpers to capture LLM and tool calls.
Frameworks
8 framework integrations — OpenAI Agents, LangChain, LlamaIndex, CrewAI, AutoGen, OTel, plus native Google ADK and Anthropic Claude Agent SDK — explicit
install() forms.