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.1.0.tar.gz (8.0 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.1.0-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agent_healthkit-0.1.0.tar.gz
  • Upload date:
  • Size: 8.0 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.1.0.tar.gz
Algorithm Hash digest
SHA256 4abeebb9b6d8255da14e833dcbe0b72c6a5660aff4bdf936a56eac8996ce6320
MD5 d3ccde5bf13a107eb96c02d41a0147cb
BLAKE2b-256 7bbf03446180f6e29a307e9e6f7d2f55189020aa64f10265964006e81d7f3fc2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for agent_healthkit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 10ef2f686a98d6a79c5b53917975f809ed97f3064a36734ba8d3effa7960a9c4
MD5 ff35824c8e1000d0bcfc9c8e26b7edeb
BLAKE2b-256 f335eece401c68f1beb83abed5baf5f6f37436ac75df563e5619ef149c20dfdc

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