Skip to main content

Open source SDK for manifest-aware agent change management

Project description

DecimalAI Python SDK

The open source SDK for Decimal AI — the agent dataset lifecycle platform.

Open In Colab

Installation

pip install decimalai

See it in 2 minutes

Both flagship workflows ship with a one-command sandbox — realistic data seeded into your workspace, so you don't have to wait to accumulate your own. Set your API key, then run either demo:

export DECIMAL_API_KEY="dai_sk_..."   # from app.decimal.ai/settings

For engineers — catch regressions before they ship

decimalai demo regression   # → impact report: what your next change would break

For prompt engineers — find skills that actually work

decimalai demo skills       # → registry ranked by real production effectiveness

Browsing without an account? Explore the public skill registry — no signup required.

Quick Start

LangChain / LangGraph — Zero-Code Tracing

import decimalai

decimalai.init(langchain=True)  # That's it — all LLM calls auto-traced

# Use LangChain as normal — nothing else changes
from langchain_openai import ChatOpenAI
llm = ChatOpenAI(model="gpt-4o")
result = llm.invoke("Hello!")  # ← Auto-captured by DecimalAI

OpenAI Agents SDK

import decimalai

decimalai.init(openai_agents=True)

Any Framework — Manual Tracing

import decimalai

decimalai.init()

@decimalai.trace(agent_name="my-agent")
def run_agent(query):
    resp = openai.chat.completions.create(model="gpt-4o", messages=[...])
    decimalai.log_llm_call(model="gpt-4o", input=msgs, output=resp)
    return resp.choices[0].message.content

Environment Variable Setup (No Code Changes)

export DECIMAL_API_KEY=dai_sk_...
export DECIMAL_AUTO_TRACE=langchain   # or "openai-agents"
# Just run your app — tracing activates on import
python app.py

What It Does

  • Auto-tracing — Captures LLM calls, tool calls, and agent steps with zero code changes
  • Agent versioning — Auto-detects tool schemas, prompts, models, and graph topology
  • Change detection — Detects when your agent configuration drifts
  • Inline evals — Run eval functions on every trace with @decimalai.eval
  • Built-in deterministic scorescompletion, has_output, tool_compliance, latency, token_efficiency attached to every trace by the SDK (disable with install(..., builtin_evals=False)). These run in your process, not server-side — bare HTTP POST /traces does not auto-score.
  • Batch evals — Run evals offline across historical traces
  • Dataset pull — One-liner to download versioned training data: decimalai.pull_dataset("ds_abc", "./data.jsonl")
  • HuggingFace Hub — Push datasets to HF Hub for instant Axolotl/Unsloth/TRL compatibility
  • Fine-tuning — Launch fine-tuning jobs on OpenAI, Together.AI, or Gemini from the platform
  • Skills management — Auto-discover SKILL.md files, sync to platform, install from registry
  • OTel compatible — Export spans to any OpenTelemetry backend

Skills

DecimalAI auto-discovers your existing SKILL.md files and provides observability — tracking which skills activate, how effective they are, and how they change over time.

Auto-Discovery (Bring Your Own Skills)

If you already have SKILL.md files (from npx skills add, your team's repo, or hand-written), the SDK discovers them automatically:

import decimalai
decimalai.init(api_key="dai_sk_...")

from decimalai.openai_agents import install
install()  # Scans .claude/skills/, .agents/skills/, etc. → syncs to dashboard

Supports 32 agent runtimes: Claude Code, Cursor, Copilot, Windsurf, Continue, and more.

Registry Search & Install

Find community skills and install them in one call:

from decimalai.skill_router import SkillRouter
router = SkillRouter(api_key="dai_sk_...")

# Search the public registry
results = router.search("code review security")

# Install a skill: fork to your org + write to disk for your agents
router.install_skill("pdf", agents=["claude-code", "cursor"])

Status & Update

# Check sync status between local files and platform
status = router.status()
# → {"synced": [...], "modified_locally": [...], "untracked": [...]}

# Pull upstream updates
router.update_skills()

See the full SDK Skills Reference for all methods.

Datasets & Training

Pull Training Data

import decimalai
decimalai.init()

# Pull the latest version to a local file
result = decimalai.pull_dataset("ds_abc123", "./training_data.jsonl")
print(f"Wrote {result['row_count']} rows")

# Pull a specific version
result = decimalai.pull_dataset("ds_abc123", "./data.jsonl", version="v2")

Push to HuggingFace Hub

# Push to HF Hub — instantly loadable by Axolotl, Unsloth, TRL
result = decimalai.push_to_hub("ds_abc123", "my-org/support-agent-sft")

# Now usable everywhere:
# from datasets import load_dataset
# ds = load_dataset("my-org/support-agent-sft")

Load as HuggingFace Dataset (In-Memory)

# Skip files — load directly into your training script
ds = decimalai.load_hf_dataset("ds_abc123")
# → Dataset({features: ['messages'], num_rows: 500})

CLI

# Pull latest version
decimalai datasets pull ds_abc123 -o ./training_data.jsonl

# Pull specific version as Parquet
decimalai datasets pull ds_abc123 -o ./data.parquet --version v2

# Push to HuggingFace Hub
decimalai datasets push-to-hub ds_abc123 my-org/support-agent-sft

Fine-Tuning Providers

Provider Models Setup
OpenAI GPT-4o, GPT-4.1-mini Dashboard or API
Together.AI Llama 4, Qwen 3, DeepSeek R1, Mistral Dashboard or API
Gemini Gemini 2.5 Flash/Pro Dashboard or API

Supported Frameworks

Framework Status Setup
LangChain / LangGraph init(langchain=True)
OpenAI Agents SDK init(openai_agents=True)
LlamaIndex init(llamaindex=True)
CrewAI init(crewai=True)
AutoGen / AG2 init(autogen=True)
Generic (any framework) @decimalai.trace()
OpenTelemetry pip install "decimalai[otel]"

Examples

See the examples/ directory for runnable notebooks with Open in Colab badges:

Notebook Description Colab
Quickstart Full version-aware loop — no LLM key needed Open In Colab
LangChain Instrument a LangChain agent Open In Colab
OpenAI Agents Instrument an OpenAI Agents app Open In Colab
Evaluations Run built-in evaluators on traces Open In Colab
Datasets Build SFT training datasets Open In Colab
Pull & Push Pull datasets locally, push to HuggingFace Hub
Version-Aware Loop Detect manifest changes and impact Open In Colab

Documentation

Full docs at docs.decimal.ai

License

MIT — see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

decimalai-0.4.0.tar.gz (414.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

decimalai-0.4.0-py3-none-any.whl (226.6 kB view details)

Uploaded Python 3

File details

Details for the file decimalai-0.4.0.tar.gz.

File metadata

  • Download URL: decimalai-0.4.0.tar.gz
  • Upload date:
  • Size: 414.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for decimalai-0.4.0.tar.gz
Algorithm Hash digest
SHA256 6482814d1b49b70f2ffcccf11a231a0c8307d8eadffdf4e2c85fdf1a6faa5b2a
MD5 b17d992abde2a71d0a684bb2c79343a6
BLAKE2b-256 a645919d28cbb62ef2b8caeabc8cbfbcaee8f84331550407cb5ca6807a060317

See more details on using hashes here.

Provenance

The following attestation bundles were made for decimalai-0.4.0.tar.gz:

Publisher: publish.yml on decimal-labs/decimalai-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file decimalai-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: decimalai-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 226.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for decimalai-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4719b23c0f8d252cba51bbe8042870a3dfbb2f11a26483b40ccaebb455ac7f8c
MD5 27a728b368e6f20c58fd0259774b6009
BLAKE2b-256 e2f2111933902891a14331e0724a05d4e773b2c62c001c3b91e045788fbd7d46

See more details on using hashes here.

Provenance

The following attestation bundles were made for decimalai-0.4.0-py3-none-any.whl:

Publisher: publish.yml on decimal-labs/decimalai-python

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page