Skip to main content

Platform-agnostic health monitoring SDK for AI agents

Project description

Agent HealthKit

Agent HealthKit is a platform-agnostic health monitoring SDK for AI agent frameworks. It provides a lightweight adapter interface that any agent system can implement to expose runtime metrics (memory usage, context size, error rates, uptime), built-in detectors for common failure modes like context bloat and resource exhaustion, and a unified run_full_check API that aggregates detector results into actionable health reports — all with zero required dependencies.

Install

pip install agent-healthkit

# Optional: system resource monitoring (CPU/RAM)
pip install agent-healthkit[system]

Quick Start

from healthkit_sdk import GenericAdapter, run_full_check

adapter = GenericAdapter()
adapter.set_metrics(memory_mb=512, context_tokens=45000, error_rate=0.01, uptime_seconds=3600)
report = run_full_check(adapter)
print(report.status)        # "healthy" | "warning" | "critical"
print(report.issues)        # list of detected issues

Built-in Detectors

Detector Description Triggers When
ContextBloatDetector Monitors token/context window usage Context > 80% of max (warning) or > 95% (critical)
SystemResourcesDetector Monitors CPU and RAM usage via psutil RAM > 80% (warning) or CPU > 90% (critical)

Extending

Implement BaseAdapter to connect your own agent framework:

from healthkit_sdk import BaseAdapter, AgentMetrics

class MyAdapter(BaseAdapter):
    def collect_metrics(self) -> AgentMetrics:
        return AgentMetrics(memory_mb=..., context_tokens=..., ...)

License

MIT © JakebotLabs

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

agent_healthkit-0.3.1.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

agent_healthkit-0.3.1-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file agent_healthkit-0.3.1.tar.gz.

File metadata

  • Download URL: agent_healthkit-0.3.1.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for agent_healthkit-0.3.1.tar.gz
Algorithm Hash digest
SHA256 34c4022fa73860444e8e496aa04ffa80eaddcc55d218ced533953d4a1b3e9ef6
MD5 a0dc6ab5e3349ff8b6efeabef8098bad
BLAKE2b-256 13b1ef20a4ac8fdadc010621c643ddc76e0e97a0206a4cbd863da9fb7c0a3ac1

See more details on using hashes here.

File details

Details for the file agent_healthkit-0.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for agent_healthkit-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e727cc34e85ec988872c16e04fefc8f558230c8cb18bd8438b3d8448d7c51e34
MD5 c26514c18a3d3b8bde81f81090dc2ac9
BLAKE2b-256 6a53d025af3d803bc35b1f57778eb5117735c74daaca63b339dbc5113e7465c0

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