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) mints a fresh AgentMint subagent, runs it, deletes it. Matches Hermes-native stateless semantics, runs on isolated cloud sandbox. 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
Strategy A plugin 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.5.0 — alpha. Auth backends: BearerAuth (Stripe-Link), TempoAuth (Tempo USDC.e — Tier 1 direct only; the delegate_task patches require Bearer for status polling). Requires AgentMint API ≥ 0.7.0.

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) mints a fresh ephem-<uuid> subagent, dispatches, polls until done, pushes the completion to Hermes' completion_queue, and deletes the subagent. ~$0.16 USDC per call (0.10 create + 0.05 run + 0.01 delete).

No pre-mint step. Multiple delegate_task calls in flight = multiple isolated subagents in parallel.

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 — Strategy A plugin (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/strategy_a_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.5.0.tar.gz (25.1 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.5.0-py3-none-any.whl (20.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: agentmint_hermes_runner-0.5.0.tar.gz
  • Upload date:
  • Size: 25.1 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.5.0.tar.gz
Algorithm Hash digest
SHA256 0fd333af14a27d52ad0099e5ba888334c8724400c402668a5d9f382eff5b34a7
MD5 38aff3e8f794523f1df5be35206b8cd4
BLAKE2b-256 e337700a985f1299f050edc05799646eb4dce7ff72e5fbd6865a8c9c08a541a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentmint_hermes_runner-0.5.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.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for agentmint_hermes_runner-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb1c3d63efbd86f9f656a6f7cc7d5e1fa027a1b4eba158ec07a6ed83db2cccc0
MD5 305dca3300391b8025a21b9580584fd6
BLAKE2b-256 7fb6e4b695388f98559e9a1d608fd0b8f52b279f24a83b78511644a7a3726e2e

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentmint_hermes_runner-0.5.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