Skip to main content

Python SDK for the AgenticML platform. Installs as `agenticml-py`, imports as `agenticml`.

Project description

agenticml-py

Python SDK for the AgenticML experiment-tracking platform — metrics, config, code snapshots, artifacts, media, and system metrics.

⚠️ Pre-alpha. The public API is not yet stable. Pin exact versions if you depend on this.

📦 Note on naming: install as agenticml-py, import as agenticml.

Install

pip install agenticml-py

# Optional extras
pip install "agenticml-py[system]"   # CPU/RAM/disk system metrics
pip install "agenticml-py[gpu]"      # NVIDIA GPU metrics
pip install "agenticml-py[media]"    # Image logging from numpy/PIL

Quickstart

import agenticml

agenticml.init(
    project="demo",
    name="exp1",
    config={"learning_rate": 0.01, "epochs": 10},
    tags=["baseline"],
)

for step in range(10):
    agenticml.log({"loss": 1 / (step + 1), "accuracy": step / 10}, step=step)

agenticml.summary["best_loss"] = 0.1
agenticml.finish()

What you get

  • Module-level API: init / log / finish / config / summary / log_artifact. One active run per process, like wandb. A Run class is also exported for multi-run cases and as a context manager.
  • Auto-incrementing step with optional commit=False to merge metrics from multiple sources at the same step.
  • Code snapshots: every file in your repo (respecting .gitignore + .agenticmlignore) plus AST-traced local imports. Content-addressed: re-runs only upload bytes the server doesn't have. 10 MB/file, 100 MB total caps by default.
  • Artifacts with auto-versioning: agenticml.log_artifact(path, name, type, metadata).
  • Media: agenticml.Image(data, caption) accepts paths, bytes, PIL.Image, or numpy arrays.
  • System metrics: psutil (CPU/RAM/disk) and pynvml (GPU) sampled in the background and logged as _system/....
  • Resume: init(id=..., resume="allow"|"must").
  • Offline mode: AGENTICML_MODE=offline writes a journal locally; agenticml sync replays it.
  • Distributed-aware: standard rank env vars detected; non-rank-0 ranks become silent no-ops.

Configuration

Env var Default Purpose
AGENTICML_HOST https://api.agenticml.xyz Server base URL
AGENTICML_API_KEY (none) Sent as Authorization: Bearer <key>
AGENTICML_MODE online online, offline, or disabled
AGENTICML_OFFLINE_DIR ~/.agenticml/offline Where offline journals are written

Offline mode

AGENTICML_MODE=offline python train.py
# ...later, from a machine with network access:
agenticml sync --host https://api.agenticml.xyz --api-key $AGENTICML_API_KEY

Development

git clone https://github.com/agenticML/agenticml.git
cd agenticml
pip install -e ".[dev]"
pytest

Releasing

Releases are published to PyPI via GitHub Actions on tags matching v*:

# bump version in pyproject.toml and src/agenticml/__init__.py
git commit -am "release: v0.0.3"
git tag v0.0.3
git push --tags

License

MIT — see LICENSE.

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

agenticml_py-0.0.3.tar.gz (29.6 kB view details)

Uploaded Source

Built Distribution

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

agenticml_py-0.0.3-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

Details for the file agenticml_py-0.0.3.tar.gz.

File metadata

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

File hashes

Hashes for agenticml_py-0.0.3.tar.gz
Algorithm Hash digest
SHA256 af711522e6f22adb309fd89a0c426b268b614e1ec19df42d06f59f0e8b37559a
MD5 d1c2ac93f6abda212e6041e2d6ff9b17
BLAKE2b-256 3cd5f6e50eed80d6be897b5c2daf05cdcd5cbaca6a3c1f977690ab869394c74b

See more details on using hashes here.

Provenance

The following attestation bundles were made for agenticml_py-0.0.3.tar.gz:

Publisher: publish.yml on agenticML/agenticml

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

File details

Details for the file agenticml_py-0.0.3-py3-none-any.whl.

File metadata

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

File hashes

Hashes for agenticml_py-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 534ff4428dea11f65ec9470927c61c04b6713579e75446a39db355f3431850be
MD5 a559de6ac5fe6bd9fcebc0a530254b5d
BLAKE2b-256 756360d4a9b4d16f2eefd1a3b57b2a3c48c3d72b0f3320019fa138bbd2934fac

See more details on using hashes here.

Provenance

The following attestation bundles were made for agenticml_py-0.0.3-py3-none-any.whl:

Publisher: publish.yml on agenticML/agenticml

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