Skip to main content

Route Hermes delegate_task(background=True) to named, persistent AgentMint subagents.

Project description

agentmint-hermes-runner

Python adapter that bridges Hermes' delegate_task(background=True) to AgentMint's cloud subagents. Three setup paths — pick one (or combine):

Mode What it does Best for
Ephemeral (default) Each delegate_task(background=True) hits AgentMint's server-side agent.run.stateless. AgentMint runs the prompt on a warm cloud worker, wipes state, and returns the result. Zero cold start; no client-side mint or destroy. Stateless fan-out + cloud isolation
Persistent Every delegate_task(background=True) routes to ONE pre-minted named subagent whose /workspace/MEMORY.md accumulates across calls. One long-running specialist that learns
Plugin tool Hermes auto-discovers a new agentmint_delegate(agent_name, goal, ...) tool from this package's entry-point. LLM picks the subagent per call. Fleet of named specialists, LLM-driven routing

The Hermes-installable skill that drives this adapter lives in a separate catalog repo: mesutcelik/agentmint-skillshermes skills install mesutcelik/agentmint-skills/hermes-delegate-task. The skill references this package by its PyPI name (pip install agentmint-hermes-runner).

Status

v0.6.0 — alpha. Auth backends: BearerAuth (Stripe-Link), TempoAuth (Tempo USDC.e — Tier 1 direct only; the delegate_task patches require Bearer). Requires AgentMint API ≥ 0.8.0 for ephemeral mode (agent.run.stateless); ≥ 0.7.0 for persistent + plugin modes.

Setup — ephemeral (default)

import os
from agentmint_hermes_runner import AgentMintDispatcher, BearerAuth, install_delegate_task_wrapper

dispatcher = AgentMintDispatcher(auth=BearerAuth(jwt=os.environ["AGENTMINT_JWT"]))
install_delegate_task_wrapper(dispatcher)   # no default_agent_name → ephemeral

Each delegate_task(background=True) hits agent.run.stateless server-side. AgentMint runs the prompt, polls until done, and pushes the completion to Hermes' completion_queue. Smoothed pricing $0.01–$0.075 per call (same band as all-inclusive agent.run).

No pre-mint step. Multiple delegate_task calls run in parallel transparently.

Setup — persistent (specialist)

dispatcher = AgentMintDispatcher(auth=BearerAuth(jwt=os.environ["AGENTMINT_JWT"]))
install_delegate_task_wrapper(dispatcher, default_agent_name="default-worker")

Pre-mint default-worker once (agent.create via curl). Every delegate_task(background=True) lands in that one subagent forever — its MEMORY.md grows over time. ~$0.05/call after the one-time $0.10 mint.

Setup — plugin tool (named fleet)

from agentmint_hermes_runner import AgentMintDispatcher, BearerAuth, set_dispatcher

dispatcher = AgentMintDispatcher(auth=BearerAuth(jwt=os.environ["AGENTMINT_JWT"]))
set_dispatcher(dispatcher)   # registers agentmint_delegate via the entry-point

Hermes' plugin discovery (hermes_agent.plugins entry-point) auto-registers agentmint_delegate when this package is pip-installed. The LLM can now call:

agentmint_delegate(agent_name="reviewer-myrepo", goal="Review the diff", async_=True)
agentmint_delegate(agent_name="support-acme",    goal="Reply to ticket #42", async_=True)

Each dispatch goes to a different named subagent (pre-minted via curl). Combine with install_delegate_task_wrapper(dispatcher) to ALSO have delegate_task(background=True) go ephemeral.

See examples/ephemeral.py, examples/persistent.py, examples/plugin.py for complete operator setup snippets.

Install

pip install agentmint-hermes-runner

Test

pip install -e ".[dev]"
pytest
ruff check .

Lower-level surface

If you want to drive AgentMint directly without the delegate_task patch or the plugin tool:

result = dispatcher.dispatch(
    agent_name="reviewer-myrepo",
    goal="Review the diff and flag risks.",
    context="Project at /workspace, Python 3.11, uses Flask + PyJWT.",
    toolsets=["terminal", "file"],     # "web" raises UnsupportedToolset
    role="leaf",                        # or "orchestrator"
    max_iterations=50,
    child_timeout_seconds=600,
)

# Batch dispatch (Hermes tasks=[…] analog):
results = dispatcher.dispatch_batch(
    tasks=[
        Task(agent_name="researcher-wasm", goal="WASM 2026 survey"),
        Task(agent_name="researcher-riscv", goal="RISC-V 2026 survey"),
    ],
    max_concurrent_children=3,
    child_timeout_seconds=900,
)

Known unsupported

  • toolsets=["web"] — no canonical AgentMint web-fetch skill yet. Raises UnsupportedToolset.
  • max_spawn_depth — AgentMint sandboxes aren't structurally bounded by depth.
  • Tempo + the delegate_task patches — polling against agent.run.status is Bearer-only. Tempo customers can use Tier 1 (direct curl) but not the install/plugin paths above. A future hybrid-auth release may close this.

License

MIT

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

agentmint_hermes_runner-0.6.0.tar.gz (24.9 kB view details)

Uploaded Source

Built Distribution

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

agentmint_hermes_runner-0.6.0-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

Details for the file agentmint_hermes_runner-0.6.0.tar.gz.

File metadata

  • Download URL: agentmint_hermes_runner-0.6.0.tar.gz
  • Upload date:
  • Size: 24.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for agentmint_hermes_runner-0.6.0.tar.gz
Algorithm Hash digest
SHA256 492ca85416cfd1436cd852bf0a0b5f61aa1004f213dbecdb7591dd47fe0a2491
MD5 6a34615b1ffdc873fe6a9d9b60d07c52
BLAKE2b-256 0104da758fcfe6088f9c5997b344a7f82ce9720f40c70af795fcbcdc4b2d6be6

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentmint_hermes_runner-0.6.0.tar.gz:

Publisher: release.yml on mesutcelik/agentmint-hermes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file agentmint_hermes_runner-0.6.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agentmint_hermes_runner-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 dcb4d2773129cd8ecfff7eebdf1ebecfa5eabd3158a71928ac232a58f55996c5
MD5 fa7e933b37def8228e95342f2a19c8d5
BLAKE2b-256 867c568a82a9687365ad3866f248428dbec8b08c4a9516be67d937d606be9ce8

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentmint_hermes_runner-0.6.0-py3-none-any.whl:

Publisher: release.yml on mesutcelik/agentmint-hermes

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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