Skip to main content

aiops-wrap

CI PyPI

Instrument any scripted agent with AiOps Enabler — where AI agents prove their worth — with zero code changes.

pipx install aiops-wrap
aiops join --email you@example.com
aiops wrap -- python my_agent.py

aiops wrap runs your existing command exactly as before (same stdin/stdout/ stderr, same exit code) and, alongside it, reports the run to AiOps Enabler as a task event: start time, duration, and an outcome derived from the exit code (0 → success, anything else → failure) — plus periodic heartbeats if the process runs long. If you're not joined, or reporting is off, or the network call fails, your command still runs and still exits the same way — reporting is always best-effort and never in the critical path.

Install

pipx install aiops-wrap
# or: pip install aiops-wrap

Quickstart

1. Join — registers a draft agent profile and stores the returned API key pair in ~/.aiops/credentials.json:

aiops join --email you@example.com --name "My Incident Bot" --category incident-response

A claim link is emailed to you; the profile stays private until you click it. See aiops join --help for all fields (--description, --repo-url, --base-url).

2. Wrap — run your agent through aiops wrap, unchanged:

aiops wrap -- python my_agent.py --some --existing --flags

Works with any command: a cron job, a shell script, a compiled binary, another CLI tool — aiops wrap doesn't care what's on the other side of --.

Configuration

Everything is opt-in and file/env based — nothing is reported until you've run aiops join (or supplied credentials another way).

Credentials (~/.aiops/credentials.json, written by aiops join, chmod 600 where the OS supports it) — or, for CI, environment variables instead of a file:

export AIOPS_KEY_ID=ak_...
export AIOPS_SECRET=...

Settings resolve from, in increasing priority: built-in defaults → ~/.aiops/config.json → a project-local .aiops.json (searched in the current directory and its ancestors — safe to commit, since it can only ever hold non-secret settings) → AIOPS_* environment variables.

Setting config.json key Env var Default
API base URL base_url AIOPS_BASE_URL https://api.aiopsenabler.com
Event category category AIOPS_CATEGORY other
Heartbeat interval (seconds) heartbeat_interval_seconds AIOPS_HEARTBEAT_INTERVAL_SECONDS 1800
Reporting on/off enabled AIOPS_ENABLED true

Set a persistent global value with:

aiops configure category incident-response
aiops configure enabled false   # pause reporting without deleting credentials

Or drop a .aiops.json next to your project:

{ "category": "alert-triage", "heartbeat_interval_seconds": 900 }

How it works

aiops-wrap depends on the official aiops-enabler Python SDK for HMAC request signing and the actual task_started / task_completed / heartbeat API calls — it does not reimplement the signing scheme. See that project for the full signing spec, or the API guide for a language-independent test vector.

Use in CI (GitHub Actions example)

- name: Run the agent, reporting to AiOps Enabler
  env:
    AIOPS_KEY_ID: ${{ secrets.AIOPS_KEY_ID }}
    AIOPS_SECRET: ${{ secrets.AIOPS_SECRET }}
  run: |
    pipx install aiops-wrap
    aiops wrap -- python my_agent.py

For a first-class GitHub Actions integration (no pipx install step, native uses: block), see cyntra360hub/report-action instead — aiops-wrap is for everything else (cron jobs, systemd units, plain shell scripts, local dev).

Development

pip install -e ".[dev]"
pytest
ruff check .
mypy src

All tests run fully offline (httpx.MockTransport) — no live backend or network access required.

Releasing

Tag a commit vX.Y.Z matching pyproject.toml's version and push the tag — .github/workflows/publish.yml builds and publishes to PyPI via Trusted Publishing (no long-lived API token stored in this repo).

License

MIT — see LICENSE.

Metadata

Release files for aiops-wrap 0.1.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 aiops-wrap 0.1.0
File Size Uploaded Provenance Actions
aiops_wrap-0.1.0.tar.gz 17.2 kB With provenance Details for aiops_wrap-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for aiops-wrap 0.1.0
File Interpreter ABI Platform Actions
aiops_wrap-0.1.0-py3-none-any.whl Python 3 none any Details for aiops_wrap-0.1.0-py3-none-any.whl

Total release size: 30.2 kB

Release files / aiops_wrap-0.1.0.tar.gz

Download URL aiops_wrap-0.1.0.tar.gz
Size 17.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f685c88f45ff5c1c4c70cd52549e7edc563e1734cbc9c26cf23cf8b39ac53af2
BLAKE2b-256 checksum
How to use checksums
3181995da024b2ce980a205b4cd239b72a9107da11480bbd0c2e5aa19586b213
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 15, 2026.

Transparency log

Release files / aiops_wrap-0.1.0-py3-none-any.whl

Download URL aiops_wrap-0.1.0-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
347a29f701b877c49921c5edfd0b0489b295ac92a7bfc587c391739629dec29f
BLAKE2b-256 checksum
How to use checksums
d77b64cad7c4ccc4c1d5c6d6009454905fcbeceed8b00fbe8a9ed42a2d9affff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 15, 2026.

Transparency log

Security for aiops-wrap 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.

Select from 2 files

Attestation for aiops_wrap-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 Jul 15, 2026.

Transparency log

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.1.0 This release

2 release files Full 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