Skip to main content

Python SDK for AgentHelm — AI Agent Control Plane

Project description

agenthelm-sdk

Python SDK for AgentHelm — The Control Plane for AI Agents.

Monitor, dispatch, and control your AI agents from your phone or dashboard.

Install

pip install agenthelm-sdk

Features

  • 🛡️ Safety Firewall: Mark tools as @read, @side_effect, or @irreversible (HIL).
  • ⚡️ One-line Integration: Add agenthelm.connect() and you're live.
  • 🛰️ Remote Dispatch: Trigger functions in your agent via Telegram or Dashboard.
  • 📊 Token Tracking: Real-time monitoring of LLM costs and usage (INR/USD).
  • 🛰️ Integrity Checkpoints: Save/Resume agent state with SHA256 hashing.
  • 🤝 Handshake Protocol: Secure, JWT-based authentication.

Usage (Standard)

from agenthelm import Agent

# Connect your agent
agent = Agent(
    key="ahe_live_...",
    name="Lead Researcher",
    version="1.0.0"
)

# Log events
agent.log("Agent is active", level="info")

# Track LLM costs
agent.track_tokens(used=500, model="gpt-4o", cost_per_1k=0.01)

🛡️ Safety Firewall (Classification-First)

Protect your mission-critical functions by classifying them.

# 1. Read-only (Always safe, no gating)
@agent.read()
def get_weather(city):
    return weather_api.fetch(city)

# 2. Side Effect (Logs and retries, but non-blocking)
@agent.side_effect(max_retries=3)
def send_email(to, subject):
    return mail.send(to, subject)

# 3. Irreversible (BLOCKS until approved by Human via Telegram/Dashboard)
@agent.irreversible(confirm="telegram", timeout=60)
def delete_database_record(record_id):
    return db.delete(record_id)

Handling Dispatch

@agent.on_dispatch
def handle_research(task):
    agent.progress("Starting research...")
    # Your logic here
    return {"status": "complete", "leads": 5}

agent.listen()

All Methods

Method Args Description
log(msg, level) level: info/warning/error/success Send log
output(data, label) data: dict Send structured output
track_tokens(used, model, cost_per_1k) used: int Track usage + cost
warn(msg) msg: str Warning shortcut
error(msg) msg: str Error shortcut
success(msg) msg: str Success shortcut
stop() Mark agent stopped

Handshake Protocol

AgentHelm uses a high-performance handshake protocol. On startup, the SDK pings the server with your connect_key to receive a short-lived JWT Session Token. All subsequent telemetry (logs, tokens) uses this token, allowing for stateless, sub-millisecond verification without database overhead.

Documentation & Dashboard

For full documentation and to get your API key, visit: https://agenthelm.online

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

agenthelm_sdk-1.0.0.tar.gz (30.6 kB view details)

Uploaded Source

Built Distribution

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

agenthelm_sdk-1.0.0-py3-none-any.whl (29.2 kB view details)

Uploaded Python 3

File details

Details for the file agenthelm_sdk-1.0.0.tar.gz.

File metadata

  • Download URL: agenthelm_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 30.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for agenthelm_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1baca4615f3754dd6dd43c7204b2c4c477a5017b37153d39516d1d51565a2d72
MD5 a38c22f6b8a81b97d4c6814151f2e506
BLAKE2b-256 a3fe7b88cecd4530584efcdbebb7f3fb7c4a4bc68111ce75dd747902aecf5f78

See more details on using hashes here.

File details

Details for the file agenthelm_sdk-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: agenthelm_sdk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 29.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.10

File hashes

Hashes for agenthelm_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4180911208b926bc6b2e71dce1345a92eca38ce65974332fa4b8149d48a46699
MD5 2be681cea76614a14f5b09ded1e86fc6
BLAKE2b-256 d0f80f982eb747ae5baaba08700071fd38a1cf54ef241aadeae493c0c2883e59

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