datarobot-skills-utils
Runtime utilities for running LLM calls through the DataRobot CLI's dr opencode
runtime, used by the DataRobot agent skills in
datarobot-agent-skills.
Beta. This package exists to support the DataRobot agent skills. Its API may change between minor versions without notice, and it carries no official support. Pin an exact version if you depend on it.
Prerequisites
- Python 3.11 or later. The package has no third-party dependencies.
- The DataRobot CLI (
dr) on yourPATH, logged in withdr auth login. Every LLM call goes throughdr opencode, so the CLI's login and model access apply.
Installation
pip install datarobot-skills-utils
Example
Start one private dr opencode serve for a batch of calls, send a prompt, and read the
token usage:
from datarobot_skills_utils.opencode import (
OpenCodeServer,
UsageMeter,
dr_available,
run_worker,
)
model = "datarobot/anthropic/claude-sonnet-4-6" # any model listed by `dr opencode models`
if not dr_available():
raise SystemExit("The DataRobot CLI (dr) is not on PATH.")
usage = UsageMeter(model)
with OpenCodeServer(models=[model], reasoning="max") as server:
text, meta = run_worker(
"Name three risks of hard-coding API keys.",
model,
server_url=server.url,
cwd=server.workdir,
)
usage.record(meta)
print(text)
print(usage.snapshot()["total"]) # calls, input/output/reasoning/cache tokens, cost
API
Everything is exported from datarobot_skills_utils.opencode.
OpenCodeServer(models=(), reasoning=None): a privatedr opencode serveon a free localhost port, in an isolated temporary working directory. Use it as a context manager;urlandworkdirare set while it runs. Passingmodelsandreasoning("max","off", or a specific effort) sets the reasoning effort and output-token limits for those models without editing youropencode.json.run_worker(message, model, server_url=None, cwd=None, timeout=120, attempts=2, ...): onedr opencode runcompletion, attached to a server or run standalone. Returns(text, token_meta), and retries an empty response.UsageMeter(model, reasoning_effort=None): thread-safe token and cost accounting across a run. Setphasebefore a batch, callrecord(meta)after each call, and read totals withsnapshot().parse_events(stdout)andstrip_code_fences(text): parsedr opencode run --format jsonoutput into text plus token accounting, and strip Markdown fences from JSON replies.dr_available(),worker_env(...),resolve_effort(...),max_reasoning_effort(...),token_limits(...): helpers for checking the CLI and resolving per-model reasoning effort and output limits.
License
Apache License 2.0. See LICENSE.
Metadata
Release files for datarobot-skills-utils 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| datarobot_skills_utils-0.1.0.tar.gz | 13.8 kB | With provenance | Details for datarobot_skills_utils-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| datarobot_skills_utils-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for datarobot_skills_utils-0.1.0-py3-none-any.whl |
Total release size: 31.1 kB
Release files / datarobot_skills_utils-0.1.0.tar.gz
| Download URL | datarobot_skills_utils-0.1.0.tar.gz |
|---|---|
| Size | 13.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
293bd623f1085030a4f7048abe2b3860368d0142c428a6e1977a04fa31024753
|
|
BLAKE2b-256 checksum How to use checksums |
e5371d9e0e76795ec95f15bb0cb41ff754c6920891d07d2065a01ace80621f30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logRelease files / datarobot_skills_utils-0.1.0-py3-none-any.whl
| Download URL | datarobot_skills_utils-0.1.0-py3-none-any.whl |
|---|---|
| Size | 17.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fa6131f0178ce1c90d1c5b4ba941b54b6548ed3d12f94cbd2de5ca5bc7d37efd
|
|
BLAKE2b-256 checksum How to use checksums |
3485033b52b56326a78f4ca316c8d4f6f5f0b91ec34858e590ee73376102ded7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logSecurity for datarobot-skills-utils 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for datarobot_skills_utils-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 21, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.