DecimalAI Python SDK
A registry of agent skills with test results. See what a skill changes, then add it to the agent you already have. The open source SDK for DecimalAI. Your agent's prompt and skills live outside your framework code, so moving it between LangChain, OpenAI Agents, the Claude Agent SDK, Pydantic AI, Google ADK and the plain OpenAI, Anthropic and Gemini SDKs keeps both.
Docs · Registry · Leaderboard · Changelog
Add a skill in three steps
No DecimalAI account needed. A skill is a SKILL.md file: instructions your agent reads when a task calls for them.
1. Find a skill. Each result says how an agent did with the skill and without it.
$ pip install "decimalai[openai-agents]"
$ decimalai skills search playwright-cli
playwright-cli, by microsoft
Automate browser interactions, test web pages and work with Playwright tests.
Passed 23 of 23 test cases with the skill, and 7 of 23 without it. Safety review: passed.
decimalai skills add playwright-cli
2. Add it to your project. It goes in .agents/skills/playwright-cli/, and the exact bytes are locked so CI gets the same ones. Cursor, Copilot, Cline, Warp and Codex read that folder by themselves; start a new chat. For Claude Code, the command prints the line to run.
decimalai skills add playwright-cli
3. Run your agent with it. agent_config() gives your agent the skills on the project's list, and a load_skill tool to read one when a task calls for it.
from agents import Agent, Runner
from decimalai.openai_agents import agent_config
support = agent_config("my-agent", fallback="You are a helpful assistant.")
agent = Agent(name=support.name, instructions=support.instructions, tools=[*support.tools])
question = "What command connects the browser CLI tool to a browser already running on http://localhost:9222?"
print(Runner.run_sync(agent, question).final_output)
Set OPENAI_API_KEY and run it. Without the skill, a model guesses a command that doesn't exist. LangChain, Pydantic AI, Google ADK, the Claude Agent SDK, and the OpenAI, Anthropic and Gemini SDKs have the same agent_config(): see Quick Start, or the Quickstart for Claude Code, Cursor and each framework step by step.
What an account adds
| You have |
You can |
| No account |
Find skills, read their test results, add them to your project, run your agent |
| Free account |
Change the prompt and skills without redeploying, see which skills each run used, test with and without a skill |
| Paid plan |
Publish skills, more usage, more seats, longer history |
Other commands that need no key:
decimalai skills pull <slug> copies any published skill's folder (SKILL.md and its bundled files) to disk: a loose copy that nothing updates.
decimalai starter support --project ./support-agent downloads a frozen, runnable Support project. Its Python standard-library runtime uses your OpenAI key locally and uploads no traces; python3 agent.py --check-setup verifies the files and --checks makes two task and two judge calls. The public builder downloads the same project without installing the SDK.
- The
agentversion manifest flow (below) diffs and gates agent manifests fully locally.
Installation
pip install decimalai
# or
uv pip install decimalai
Requires Python 3.10+ (pip won't install current releases on older Pythons). The [adk], [pydantic-ai] and [all] extras need Python 3.11+: the google-adk and pydantic-ai-slim releases they install require it. On Python 3.10 pip does not refuse them; it installs an older decimalai instead (see below).
[langchain] installs on Python 3.10 with one limit there. asyncio on 3.10 cannot hand a run's config to an async LangGraph node, so a model that the node calls without passing config on, as create_agent's model node does, runs outside the run. Under ainvoke / astream the run's trace leaves those model calls out (a handler installed by init(langchain=True) traces each one apart from the run); the agent's prompt and skills still reach the model. The SDK logs a warning the first time it happens. Sync .invoke() runs and every run on Python 3.11+ are unaffected.
Each framework extra supports the framework's latest release only, and floors it there.
The core install is deliberately thin (tracing, CLI, manifests, skills). Framework and provider adapters ship as extras — install the one matching your stack:
pip install "decimalai[langchain]" # LangChain (add [langgraph] for LangGraph)
pip install "decimalai[openai-agents]" # OpenAI Agents SDK
pip install "decimalai[openai]" # OpenAI SDK: your own Chat Completions / Responses loop
pip install "decimalai[google-genai]" # Gemini API (google-genai): your own Gemini calls
pip install "decimalai[anthropic]" # Anthropic Messages API
pip install "decimalai[all]" # every framework adapter (not [evals]; see below)
Available extras: [langchain], [langgraph], [openai], [openai-agents], [anthropic], [google-genai], [llamaindex], [claude-agent-sdk], [pydantic-ai], [adk], [evals], [all].
[evals] installs litellm, which pins openai<3, while [openai], [openai-agents] and [pydantic-ai] need openai>=3. So [evals] is not part of [all], and it cannot be installed in the same environment as those three. CrewAI has no extra for the same reason: install crewai yourself, beside the adapters that run on openai<3.
When pip installs an older decimalai
Extras that cannot be installed together are not an error to pip. It goes back through older decimalai releases until one resolves, installs that, and prints nothing (uv pip install does the same). Two requests do this today, and both end on decimalai 0.13.9, the last release before the framework floors above, without this release's fixes:
[evals] together with [openai], [openai-agents], [pydantic-ai] or [all], on any Python.
[adk], [pydantic-ai] or [all] on Python 3.10.
Check the version you got, and put a floor on decimalai itself so pip names the conflict instead of falling back:
pip show decimalai # Version: 0.13.9 means pip fell back
pip install "decimalai[adk]>=0.14" # fails with an error rather than install 0.13.9
Quick Start
LangChain / LangGraph
from langchain.agents import create_agent
from decimalai.langchain import agent_config
# The agent's prompt and skills from DecimalAI, as one middleware: every model call gets
# the saved prompt, then the agent's skill list, and the load_skill tool. Its runs are traced.
support = agent_config("support")
agent = create_agent("openai:gpt-5.4-mini", tools=[lookup_order], middleware=[support.middleware])
agent.invoke({"messages": [{"role": "user", "content": "Where is my order?"}]})
A conversation (a thread_id, with a checkpointer) keeps its first message's system message and
load_skill definition, so a prompt saved mid-chat cannot break it: Claude rejects a changed one
once a thinking block is in the history. {{variables}} in the saved prompt are filled from the
run's context=. To trace every LangChain call in the process with no skills,
decimalai.init(langchain=True).
A trace is sent when a chain, agent, or graph run completes. A bare llm.invoke("Hello!")
with no surrounding chain never reaches that boundary, so it sends nothing — wrap the call, or
see manual tracing for the per-call
handler.
OpenAI Agents SDK
from agents import Agent, Runner
from decimalai.openai_agents import agent_config
support = agent_config("support", fallback=BASE_INSTRUCTIONS) # reads DECIMAL_API_KEY
agent = Agent(
name=support.name,
instructions=support.instructions, # the agent's saved prompt, then its skill list
tools=[lookup_order, *support.tools], # + load_skill
)
result = Runner.run_sync(agent, "Where is ORD-1001?")
agent_config() reads the agent's prompt and keeps a local copy, re-read in the background, so a
prompt saved in the dashboard reaches the next run (within a minute) with no redeploy. Each run's
skill list is routed on that run's own message: the first run before its model call, later runs from
a local copy while their decision is recorded in the background, and an agent with more skills than
its skill list holds before every model call. Prompt variables ({{name}}) are filled from
Runner.run(..., context=...); a missing value stops the run before the model call. Nothing in the
OpenAI SDK is patched and other agents in the process are untouched. Each run is traced with its
prompt version and the skills offered, loaded and delivered. init(openai_agents=True) (or
instrument()) traces runs and changes no agent; skills come only from agent_config().
On Claude (through LiteLLM), give a chat's runs one RunConfig(group_id=...), its thread id: they
keep the first run's instructions and load_skill definition, because Claude rejects a turn whose
instructions or tools changed since a thinking block in its history was made (HTTP 400); a newer
saved prompt reaches the next chat. support.conversation(group_id, state=...) and chat.state
carry a chat to another process.
Pydantic AI
from pydantic_ai import Agent
from decimalai.pydantic_ai import agent_config
support = agent_config("support", fallback=BASE_INSTRUCTIONS) # reads DECIMAL_API_KEY
agent = Agent(
"openai:gpt-5.4-mini",
name=support.name,
tools=[lookup_order],
capabilities=[support], # the agent's saved prompt, its skill list, and load_skill
)
result = agent.run_sync("Where is ORD-1001?", deps=customer)
support is a Pydantic AI capability: its instructions are the saved prompt (its {{variables}}
filled from the run's deps), then the skill list routed on the run's prompt, and its toolset is
load_skill. Each run is one trace filed under the DecimalAI agent, with no other line:
agent_config() puts DecimalAI's OpenTelemetry exporter on the global tracer provider, sending only
its runs, and instruments each run of the capability with Pydantic AI's own spans (its model and tool
calls, any provider); other agents in the process are not instrumented. A run the app already
instruments (Agent.instrument_all(), Logfire) keeps that instrumentation, and one whose model's SDK
decimalai.init(openai=True) traces is not instrumented twice. Nothing in Pydantic AI is patched.
Google ADK
from google.adk.agents import LlmAgent
from google.adk.apps import App
from google.adk.runners import InMemoryRunner
from decimalai.adk import DecimalAIPlugin, agent_config
support = agent_config("support", fallback=BASE_INSTRUCTION) # reads DECIMAL_API_KEY
agent = LlmAgent(
name="support_agent", # ADK's own name, a Python identifier
model="gemini-3.5-flash",
instruction=support.instruction, # the agent's saved prompt, then its skill list
tools=[lookup_order, *support.tools], # + load_skill
)
app = App(name="support_app", root_agent=agent, plugins=[DecimalAIPlugin()])
runner = InMemoryRunner(app=app)
support.instruction is an ADK instruction provider: ADK calls it before each model request, and
each invocation's skill list is routed once, on that invocation's message. Prompt variables
({{name}}) are filled from the session's state (ADK fills no {var} of its own in a provider's text); a missing
value stops the run before the model call. DecimalAIPlugin() in the App makes each invocation one
trace, filed under the DecimalAI agent with its prompt version and the skills offered, loaded and
delivered; a runner built without it is not traced. Nothing in ADK is patched. An agent that carries
ADK's own SkillToolset gets no DecimalAI skills.
OpenAI SDK (Chat Completions and Responses API)
from openai import OpenAI
from decimalai.openai import agent_config
client = OpenAI()
support = agent_config("support", fallback=BASE_PROMPT) # reads DECIMAL_API_KEY
with support.run(question, variables=customer) as run:
messages = [{"role": "system", "content": run.system}, run.message]
while True:
reply = client.chat.completions.create(
model="gpt-5.4-mini", messages=messages,
tools=[*my_tools, *run.tools], # + load_skill
).choices[0].message
messages.append(reply)
if not reply.tool_calls:
break
for call in reply.tool_calls:
messages.append(run.tool_result(call) or my_tool_result(call))
answer = reply.content
The same shape as the Anthropic module below: one run is one user message, opening it routes the
skill list on that message, fills the prompt's variables ({{name}}) from variables= and starts the
run's trace, and closing it sends the trace, filed under the DecimalAI agent with its prompt version
and the skills offered and loaded. run.system is the system message's text, run.message the user
turn, run.tools the load_skill tool in Chat Completions' shape, and run.tool_result(call)
answers a load_skill call with its tool message (None for your own tools). On the Responses
API pass instructions=run.system, input=[run.message] and tools=[*my_tools, *run.response_tools];
run.tool_result(call) answers a function_call item with its function_call_output. Send
instructions with every request: a previous_response_id does not carry them over. The tools are
plain dicts and calls are read as the SDK returns them or as dicts, so an OpenAI-compatible endpoint
or LiteLLM's completion() takes the same run; only calls made through an openai client are traced.
async with and await run.atool_result(call) serve AsyncOpenAI, and support.conversation() keeps
a chat's system text and tool fixed, as on Anthropic. agent_config() turns on OpenAI tracing
(OpenInference's instrumentor, installed by decimalai[openai]) for its runs only;
init(openai=True) traces every OpenAI call.
Gemini API (google-genai)
from google import genai
from google.genai import types
from decimalai.google_genai import agent_config
client = genai.Client()
support = agent_config("support", fallback=BASE_PROMPT) # reads DECIMAL_API_KEY
with support.run(question, variables=customer) as run:
chat = client.chats.create(model="gemini-3.5-flash", config=types.GenerateContentConfig(
system_instruction=run.system, # the agent's saved prompt, then its skill list
tools=[lookup_order, *run.tools], # your functions, then load_skill
))
answer = chat.send_message(run.message).text