Skip to main content

automl-agent-client

Python client and CLI for AutoML-Agent. Describe an ML task in one sentence, add your data, and five AI agents do the rest:

  • plan the approach;
  • search models and hyperparameters;
  • write the pipeline and verify it;
  • hand you a deployable script.
pip install automl-agent-client

1. Get an API key

Sign in at agentml.kitasid.dev. Open Settings → API keys, then create a key. It's shown once, so copy it. Then use either option:

agentml login                      # paste the key; it's saved for your user only
# or
export AUTOML_AGENT_API_KEY=amk_…

2. Python

from automl_agent_client import AutoMLClient

client = AutoMLClient()

run = client.runs.create(
    "Classify banana quality as Good or Bad. Accuracy must be at least 0.98.",
    files=["banana_quality.csv"],
)
for event in client.runs.stream(run.run_id):  # live, stage by stage
    print(event.stage, event.status, event.message)

record = client.runs.get(run.run_id)
print(record.status)  # completed
open("pipeline.py", "w").write(client.runs.code(run.run_id))

for chunk in client.runs.ask(run.run_id, "Why was this model chosen?"):
    print(chunk, end="")

Or in one call: record = client.runs.run("…", files=[…], timeout=900).

Async: the same methods, awaitable, on AsyncAutoMLClient:

async with AsyncAutoMLClient() as client:
    run = await client.runs.create("Forecast daily sales for 14 days", files=["sales.csv"])
    async for event in client.runs.stream(run.run_id):
        ...

Drift

Check fresh data against what a run learned from. If you include the target column, executed runs also re-score the trained model.

analysis = client.drift.analyze(run.run_id, "bananas_this_week.csv")
analysis = client.drift.wait(run.run_id, analysis.id)  # the model check finishes in the background
print(analysis.result.data.status)  # stable / moderate / drifted

Deployed models

Deploy an executed tabular run's trained model, then predict, explain and keep it fresh. Retraining reuses the run's pipeline and best hyperparameters on your new labelled data, with no LLM involved, and every retrained version waits for your approval.

dep = client.deployments.create(run.run_id, name="Banana quality")
client.deployments.wait_ready(dep.deployment.id)

out = client.deployments.predict(dep.deployment.id, [{"Size": -1.9, "Weight": 0.4, "Sweetness": 0.6}], explain=True)
print(out.predictions, out.probabilities, out.explanation.contributions)

client.deployments.feedback(dep.deployment.id, out.prediction_id, labels=["Good"])  # ground truth
client.deployments.add_data(dep.deployment.id, "labelled_this_week.csv")            # more labelled rows

for v in client.deployments.versions(dep.deployment.id):  # retrains appear as candidates
    print(v.version, v.status, v.trigger.reason, v.metrics.comparison)
client.deployments.promote(dep.deployment.id, version_id)  # or .reject(...), .rollback(...)

3. CLI

agentml run "Classify banana quality, accuracy >= 0.98" -f banana_quality.csv --follow
agentml list
agentml code <run-id> -o pipeline.py
agentml ask <run-id> "Which features matter most?"
agentml drift <run-id> new_data.csv --wait

agentml deploy <run-id> --wait
agentml predict <deployment-id> -f rows.csv --explain
agentml feedback <deployment-id> <prediction-id> Good,Bad,Good
agentml add-data <deployment-id> labelled.csv
agentml versions <deployment-id>
agentml promote <deployment-id> <version-id>
agentml rollback <deployment-id>

Errors and limits

Situation Exception
Missing, invalid or revoked key AuthenticationError
Not your run, or no such run NotFoundError
Daily run limit reached (retry_after gives the seconds until it resets) RateLimitError
Run or analysis not in a state that allows the request ConflictError
Uploads too large PayloadTooLargeError
wait() gave up (the run continues on the server) RunTimeoutError

All of these inherit from AutoMLError. Requests that only read data are retried automatically on network errors and 502/503/504.

Configuration:

  • AUTOML_AGENT_API_KEY: the API key.
  • AUTOML_AGENT_BASE_URL: the API root, default https://agentml.kitasid.dev/api.
  • AUTOML_AGENT_CONFIG_DIR: where agentml login saves the key.

The pipelines, agents and models run on the AutoML-Agent service. This package is only the client.

Metadata

Release files for automl-agent-client 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for automl-agent-client 0.2.0
File Size Uploaded Provenance
automl_agent_client-0.2.0.tar.gz 29.7 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for automl-agent-client 0.2.0
File Interpreter ABI Platform
automl_agent_client-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 64.0 kB

Release files / automl_agent_client-0.2.0.tar.gz

Download URL automl_agent_client-0.2.0.tar.gz
Size 29.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c8c0e5808789c38fada88d72413c6bbd0eb8026da487c525b70fb778b44fd752
BLAKE2b-256 checksum
How to use checksums
6628998c871f9fc44fa4042f429a4c0df8cb0f8f7bdb9da8d4823f7d65c1a2d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / automl_agent_client-0.2.0-py3-none-any.whl

Download URL automl_agent_client-0.2.0-py3-none-any.whl
Size 34.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4fd67b8d21450c36774461bbb5c6a1c0af17f90f4f047dd788183ab9c1b97933
BLAKE2b-256 checksum
How to use checksums
37ab1ffba73c64ed5910a522c11ae9ab710089bdcb7fac17e1fad011650a1822
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.0 {"installer":{"name":"uv","version":"0.13.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for automl-agent-client 0.2.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A 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.

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page