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.2.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.2-py3-none-any.whl (26.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agenticml_py-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 d57dfb584318a8565fd3c7342b0e550eb9c3b643c22848c7a82a1bc9c8792889
MD5 602ab306e8706308008c7deb16f1e62a
BLAKE2b-256 2e86bd26851c7ca5c7748517c81c4f042365871ac387a0d049fbf75834a85151

See more details on using hashes here.

Provenance

The following attestation bundles were made for agenticml_py-0.0.2.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.2-py3-none-any.whl.

File metadata

  • Download URL: agenticml_py-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a1fe4e84ee8d9463860ac3bf3c4266b12e7b5af756f31cbe43f90da43efb2a03
MD5 ac005af852066825e58359ca77083482
BLAKE2b-256 a58cce00d0bcbe54ad01630bcfcd989a237600b61cd953963bdd402eac8ccfec

See more details on using hashes here.

Provenance

The following attestation bundles were made for agenticml_py-0.0.2-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