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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34c4022fa73860444e8e496aa04ffa80eaddcc55d218ced533953d4a1b3e9ef6
|
|
| MD5 |
a0dc6ab5e3349ff8b6efeabef8098bad
|
|
| BLAKE2b-256 |
13b1ef20a4ac8fdadc010621c643ddc76e0e97a0206a4cbd863da9fb7c0a3ac1
|
File details
Details for the file agent_healthkit-0.3.1-py3-none-any.whl.
File metadata
- Download URL: agent_healthkit-0.3.1-py3-none-any.whl
- Upload date:
- Size: 15.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e727cc34e85ec988872c16e04fefc8f558230c8cb18bd8438b3d8448d7c51e34
|
|
| MD5 |
c26514c18a3d3b8bde81f81090dc2ac9
|
|
| BLAKE2b-256 |
6a53d025af3d803bc35b1f57778eb5117735c74daaca63b339dbc5113e7465c0
|