Skip to main content

Python SDK for AgentHelm — AI Agent Control Plane

Project description

agenthelm-sdk

Monitor your AI agents from AgentHelm. Add one line. See everything.

Install

pip install agenthelm-sdk

Quick Start

import agenthelm

Connect your agent (one line):

dock = agenthelm.connect( "ahe_live_xxxxx", name="My Agent" )

Send logs:

dock.log("Agent started") dock.log("Warning: rate limit", level="warning") dock.log("Task complete", level="success")

Track token usage:

dock.track_tokens(used=1500, model="gemini-flash") dock.track_tokens( used=2000, model="gpt-4", cost_per_1k=0.03 )

Send structured output:

dock.output({ "leads_found": 12, "hot_leads": 5, "report_sent": True })

Report errors:

try: risky_operation() except Exception as e: dock.error("Operation failed", exception=e)

Handle dashboard commands:

@dock.on_command("stop") def handle_stop(payload): dock.log("Stopping agent...") dock.stop()

@dock.on_command("run_now") def handle_run(payload): # run_main_task() dock.reply("Task started!")

Chat with your agent:

@dock.on_chat def handle_chat(message: str): if "status" in message.lower(): dock.reply("Running fine!") else: dock.reply(f"Received: {message}")

Keep agent alive:

dock.listen()

Context Manager

with agenthelm.connect("ahe_live_xxxxx") as dock: dock.log("Working...") # do_work() dock.output({"done": True})

Agent auto-stops when block exits.

Configuration

dock = agenthelm.connect( key="ahe_live_xxxxx", name="My Agent", agent_type="python", version="2.1.0", verbose=True, ping_interval=30, command_poll_interval=5, timeout=5 )

Links

Dashboard: https://agenthelm.dev Docs: https://agenthelm.dev/docs Support: support@agenthelm.dev

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-0.1.0.tar.gz (9.0 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-0.1.0-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for agenthelm_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4d8ae767082333ec1077961629112c89635069c0e93edf7663cc0b3d651efb3f
MD5 9194761ae810771edbf7b877814b619b
BLAKE2b-256 64a6384b33b38d2b0887bbe70803d4b9f8135f866ae9cb6f46f8e2276c1c39be

See more details on using hashes here.

File details

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

File metadata

  • Download URL: agenthelm_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.6 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-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c01280f95176395288243267566dd57c5dc955d63794855a541d70a497e50893
MD5 fab55487e35788e9b5660d3cbfabcc7c
BLAKE2b-256 7b8517f18d350752be7cf65cd4715acf1e308fc2c86f45e122daa3fd1696fd1d

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