Skip to main content
The Python SDK is the primary way to integrate DecimalAI into your agent code. It wraps every public REST endpoint, auto-instruments 8 agent framework integrations plus 3 direct LLM provider SDKs (OpenAI, Anthropic, Google) — including native plugins for Google ADK and Anthropic’s Claude Agent SDK — and ships zero-config helpers for tracing, evaluation, and dataset export.

Sections

Init & Setup

decimalai.init(), environment variables, framework flags.

Tracing

@trace, start_trace, log_llm_call, log_tool_call, @tool.

Manifests

register_manifest, flush_manifest_for_ci.

Evaluations

eval, score, get_eval_breakdown, batch_eval, @eval, external imports.

Replay & Experiments

get_replay_prompts, create_replay_batch, get_replay_batch.

Datasets & Training

pull_dataset, push_to_hub, load_hf_dataset.

Framework Instrumentation

8 framework integrations — OpenAI Agents, LangChain, LlamaIndex, CrewAI, AutoGen, generic OTel, plus native plugins for Google ADK and Anthropic Claude Agent SDK.

Skills

Sync from disk, pull from platform, SkillRouter CRUD.

Complete API Summary

Top-level functions (in decimalai)

Grouped by surface. Every function below is importable directly from decimalai.

Framework instrumentation (subpackages)

8 framework integrations — seven ship a subpackage; CrewAI is flag-only (see below). Google ADK and Anthropic’s Claude Agent SDK use native plugins (not OTel). There is no decimalai.crewai subpackage — CrewAI rides the generic OTel rail: decimalai.init(crewai=True) is a convenience alias for the OTel exporter (see Frameworks).

Class-based clients

Body delivery is budgeted per turn via four constructor kwargs, mirroring the backend defaults: max_loaded_bodies=3 (max distinct bodies per turn), body_token_budget=6000 (estimated-token ceiling across loaded bodies), per_body_char_limit=8192 (per-body trim), body_load_deadline_s=20.0 (wall-clock cutoff after which further loads are refused).
Two inject flags, two scopes — they are not spellings of the same thing. SkillRouter(inject_body=True) configures that router instance to include routed bodies in its prompt fragment. decimalai.init(inject_skill_body=True) (env: DECIMALAI_INJECT_SKILL_BODY=1) is global adapter config — it turns on budgeted body injection for framework adapters without a tool loop (langchain, anthropic). Setting one does not set the other.

REST-only endpoints

For endpoints that don’t yet have a top-level SDK wrapper (list_datasets, get_trace_stats, get_manifest, compatibility policy set, etc.), use httpx directly against the REST API:
See the API Reference for the full endpoint registry.