Skip to main content

Official Python client for the A2EA telemetry and attribution platform.

Project description

a2ea-py

Official Python SDK for sending A2EA telemetry to the backend.

Install

pip install a2ea-py

Quickstart

from a2ea import A2EAClient

client = A2EAClient(
    api_key="your X-A2EA-API-Key"
)


@client.track_agent(task_type="data_processing")
def run_agent(payload):
    return process(payload)

Optional configuration

  • base_url
    • Defaults to https://aimodularity.com
    • Set this when testing locally against http://127.0.0.1:4080
  • agent_id
    • Optional override if you want to assign a fixed agent identifier instead of the default host/process-based value

Example for local development:

from a2ea import A2EAClient

client = A2EAClient(
    api_key="your X-A2EA-API-Key",
    base_url="http://127.0.0.1:4080",
    agent_id="agent_pipeline_014",
)

What the client sends

Each tracked function call produces:

  • eventId
  • agentId
  • timestamp
  • durationMs
  • taskType
  • outcome
  • verification

The verification payload is signed locally with HMAC-SHA256 using the workspace API key so the backend can verify the telemetry envelope.

Reliability behavior

  • submission runs in a background thread
  • transient failures are retried with backoff
  • exhausted events are retained in a local fallback buffer

Local package test commands

python -m unittest discover tests
python -m build
pip install dist/a2ea_py-0.1.0-py3-none-any.whl

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

a2ea_py-0.1.0.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

a2ea_py-0.1.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file a2ea_py-0.1.0.tar.gz.

File metadata

  • Download URL: a2ea_py-0.1.0.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for a2ea_py-0.1.0.tar.gz
Algorithm Hash digest
SHA256 d9a12162e18e2fe095ddb8b2bcd44bcf2d793f4371782ef58edac578fd19e7d0
MD5 7c906eb6dceee365f8d2098507b12f17
BLAKE2b-256 f7fd0bcf2902a699f99173702d782a5d552d2e2a3ddea32d64282ba234261962

See more details on using hashes here.

File details

Details for the file a2ea_py-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: a2ea_py-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for a2ea_py-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 149bbcea53bf618d6c087f228e4e79bf297986d37c1c6db9f49b157026186f9f
MD5 8ad38c0872e50ac505395536df0202f8
BLAKE2b-256 e31a8cf4e831c8270b8a3948825c5504b7a23440ab33a2c8082d110667b67054

See more details on using hashes here.

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