Skip to main content

Enigmind Agent Python SDK

A lightweight Python SDK for secure IoT device connectivity.

Quick Start

from enigmind_agent import Agent, AgentConfig

config = AgentConfig(
    broker_url="mqtts://broker.enigmind.ai:8883",
    device_id="device-123",
    api_key="YOUR_API_KEY",
)

agent = Agent(config)
agent.start()
agent.send_telemetry({"temp": 22.4, "vibration": 0.12})

Device Claim Flow (Zero-Touch Setup)

If the agent starts without credentials (device_id + api_key/password), it automatically enters the claim flow:

  1. Generates a stable hardware fingerprint and a human-readable claim token.
  2. Calls the claim API (/api/claims/initiate).
  3. Polls /api/claims/{token}/status until approved.
  4. Stores the returned credentials locally and connects to MQTT.

The claim token is printed at startup when using the CLI, and is also stored locally for retrieval. By default the state file is saved under your user data directory as enigmind_agent/state.json. If you embed the SDK directly, enable Python logging at INFO level to see claim output.

CLI Example

ENIGMIND_CLAIM_BASE_URL=https://api.enigmind.ai enigmind-cli run

Check claim status and token:

enigmind-cli claim status

JSON Config Example

{
  "broker_url": "mqtts://broker.enigmind.ai:8883",
  "claim": {
    "base_url": "https://api.enigmind.ai",
    "poll_interval_s": 5,
    "timeout_s": 300
  }
}

Installation & Setup

py -3.12 -m venv .venv
.venv\Scripts\Activate.ps1
python -m pip install -U pip
pip install -e .[dev]

Optional Health plugin:

pip install -e .[health]

CLI

enigmind-cli send --data '{"temp": 22.4}' --config ./enigmind.json

Releasing

Releases are published to PyPI automatically via GitHub Actions when you create a GitHub Release.

  1. Bump version in pyproject.toml.
  2. Commit and push to main.
  3. Go to GitHub → Releases → Draft a new release.
  4. Create a new tag (e.g. v0.1.0), add release notes, and click Publish release.
  5. The release.yml workflow will build and publish the package to PyPI.

Plugins

  • Health plugin: CPU/memory/disk metrics (requires optional dependency psutil).
  • Geo plugin: local geofencing hooks (no extra dependencies).

Metadata

Release files for enigmind-agent 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 enigmind-agent 0.1.0
File Size Uploaded Provenance
enigmind_agent-0.1.0.tar.gz 16.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for enigmind-agent 0.1.0
File Interpreter ABI Platform
enigmind_agent-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 33.9 kB

Release files / enigmind_agent-0.1.0.tar.gz

Download URL enigmind_agent-0.1.0.tar.gz
Size 16.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ef9008729d69d7968a9020eb184313258783611fda2422b293c5f44d69c61e03
BLAKE2b-256 checksum
How to use checksums
9fc5959c398d7355f2ae52cf19a7146481df8202f40dbb953f7fb87bc57145ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Feb 6, 2026.

Transparency log

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

Download URL enigmind_agent-0.1.0-py3-none-any.whl
Size 17.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4946907f2183e94cedf87d5b0e4a8ac71f15ec2354eb2feb1ec8d3af8c140c63
BLAKE2b-256 checksum
How to use checksums
ec19c6ef731445e38eacca9e27437446e1e2c4213d92e73f67748dd2a343483c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

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 Feb 6, 2026.

Transparency log

Security for enigmind-agent 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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for enigmind_agent-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 Feb 6, 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