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.2.0.tar.gz (9.2 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.2.0-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agent_healthkit-0.2.0.tar.gz
  • Upload date:
  • Size: 9.2 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.2.0.tar.gz
Algorithm Hash digest
SHA256 6230f5e16f8fcb2fe207e34603fe9d503c44b128c76e1577a6457a4d21e5bb79
MD5 37e727b81aa52ba034859d208180d28c
BLAKE2b-256 4d14c5bea25d2b56a4d2dca1f09ea9b9f9c544d26b9f3dc9fc19752d42b18dbd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for agent_healthkit-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 77b547c424cf161722c42da5bcd7896517693193bc7b9359aac7f7a4acdddb27
MD5 95125e15e96702804207139d6d25f7d5
BLAKE2b-256 92bc964e500506145548ef7d60ad66d547e0952d743ccc2cd79b00d85b06744c

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