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 named, persistent AgentMint subagents — specialists that accumulate /workspace/MEMORY.md across calls.
One install path: monkey-patch delegate_task so every async delegation can route to AgentMint. The LLM picks the target subagent via either default_agent_name (set at install) or by including "agentmint-<name>" in the toolsets list (per-call routing).
The Hermes-installable skill that drives this adapter lives in a separate catalog repo: mesutcelik/agentmint-skills —
hermes skills install mesutcelik/agentmint-skills/hermes-delegate-task. The skill references this package by its PyPI name (pip install agentmint-hermes-runner).
Status
v0.10.0 — alpha. Auth backends: BearerAuth (any rail — Stripe-Link / x402 / Tempo MPP), TempoAuth (Tempo USDC.e — Tier 1 direct only; the delegate_task patches require Bearer).
New in 0.10.0: auto-wiring at Hermes boot. pip install + one-time agentmint-hermes-init + restart = adapter active. No edits to Hermes' startup script needed.
Routing model
There are exactly two ways the runner picks the target subagent. They serve different intents — don't conflate them.
default_agent_name |
Role |
|---|---|
"general-worker" (or similar generic name) |
Catch-all for unrouted delegations. Use when Hermes wants to offload arbitrary subtasks to a single persistent worker whose MEMORY.md accumulates as the session breadcrumb trail. The default should always be a generic worker — never a specialist. Naming a specialist as the default breaks the moment you add a second specialist. |
None (no default) |
Unrouted delegations fall through to Hermes-native delegate_task. Use when AgentMint involvement is opt-in per call. |
toolsets=["agentmint-<name>"] directive |
Role |
|---|---|
Per-call specialist routing. LLM dispatches to a specific named expert (pr-reviewer, data-analyst, slack-bot, …). Each specialist has its own MEMORY.md. Always use this for specialists — not the default slot. |
Setup — three commands
# 1. Install the runner inside Hermes' Python environment
pip install agentmint-hermes-runner
# 2. One-time interactive bootstrap — picks a rail, tops up the wallet,
# caches the JWT to ~/.agentmint/credentials.json, mints `general-worker`
agentmint-hermes-init
# 3. Restart Hermes
# The runner's `hermes_agent.plugins` entry-point fires at boot,
# reads the cached JWT, and auto-wires `delegate_task`.
That's it. Every unrouted delegate_task(background=True) now lands in general-worker — its MEMORY.md grows across every delegation that doesn't carry a specialist directive.
If you'd rather wire the adapter by hand (e.g. you're injecting the JWT from a secret manager, not a file on disk), the lower-level API still works:
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, default_agent_name="general-worker")
The autoload entry-point becomes a no-op if AGENTMINT_JWT is unset AND ~/.agentmint/credentials.json is absent — safe to leave installed even in setups that bring their own wiring.
Setup — per-call specialist routing
The LLM picks the target specialist on each call via the toolsets list:
# Operator setup is identical — generic default + LLM-driven overrides.
install_delegate_task_wrapper(dispatcher, default_agent_name="general-worker")
# The LLM then dispatches like this:
delegate_task(
background=True,
goal="Review PR 42 in mesutcelik/agentmint-mono",
toolsets=["terminal", "file", "agentmint-pr-reviewer"],
)
The adapter parses agentmint-pr-reviewer from toolsets, routes that call to that subagent (overriding default_agent_name), and strips the entry from the toolset list before composing the prompt the subagent receives.
This is a workaround for Hermes' delegate_task not accepting a dispatcher-target argument. A formal proposal is in docs/hermes-feature-request.md — when an upstream extension lands, this hack will be deprecated in favor of a first-class dispatcher or metadata parameter.
Pattern discipline
default_agent_name→ generic worker only (general-worker,default-worker, etc.)- Specialists → only via
toolsets=["agentmint-<name>"] - Never name a specialist as the default. Specialists scale; defaults are catch-all.
See examples/persistent.py for a complete operator setup snippet.
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:
result = dispatcher.dispatch(
agent_name="reviewer-myrepo",
goal="Review the diff at /workspace/pr-42.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,
workspace_files=[ # ship inputs into the sandbox before the run
{"path": "/workspace/pr-42.diff", "content": "diff --git a/foo ..."},
],
cleanup_paths=["/workspace/pr-42.diff"], # wipe them after the run
)
# 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. RaisesUnsupportedToolset.max_spawn_depth— AgentMint sandboxes aren't structurally bounded by depth.- Tempo + the
delegate_taskpatches — polling againstagent.run.statusis Bearer-only. Tempo customers can use Tier 1 (direct curl) but not the install/plugin paths above.
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
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 agentmint_hermes_runner-0.10.0.tar.gz.
File metadata
- Download URL: agentmint_hermes_runner-0.10.0.tar.gz
- Upload date:
- Size: 27.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b2618deb3777405932b2fc2fe132c281f181ec04540eee53dcc9c93b64620773
|
|
| MD5 |
f2f2639af8e96452cb0f2c32c1e489eb
|
|
| BLAKE2b-256 |
80a2c24ce0c6cba0d36e6afae987a114e0393395f0e9519e182c059acf15ef33
|
Provenance
The following attestation bundles were made for agentmint_hermes_runner-0.10.0.tar.gz:
Publisher:
release.yml on mesutcelik/agentmint-hermes
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentmint_hermes_runner-0.10.0.tar.gz -
Subject digest:
b2618deb3777405932b2fc2fe132c281f181ec04540eee53dcc9c93b64620773 - Sigstore transparency entry: 1979904957
- Sigstore integration time:
-
Permalink:
mesutcelik/agentmint-hermes@22e889d64c05c412089a2e50db3aaedbb0b4d392 -
Branch / Tag:
refs/tags/v0.10.0 - Owner: https://github.com/mesutcelik
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@22e889d64c05c412089a2e50db3aaedbb0b4d392 -
Trigger Event:
push
-
Statement type:
File details
Details for the file agentmint_hermes_runner-0.10.0-py3-none-any.whl.
File metadata
- Download URL: agentmint_hermes_runner-0.10.0-py3-none-any.whl
- Upload date:
- Size: 24.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8cb2555f0b16f2ccaa8646b747e598c92f0292410839032325f2624ef95c1f7c
|
|
| MD5 |
56b433a10b3108a5053e46face304664
|
|
| BLAKE2b-256 |
92b1eb66786a0547a7af32bb2262f659d8900ccd28406d41f012c1ab5effc958
|
Provenance
The following attestation bundles were made for agentmint_hermes_runner-0.10.0-py3-none-any.whl:
Publisher:
release.yml on mesutcelik/agentmint-hermes
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentmint_hermes_runner-0.10.0-py3-none-any.whl -
Subject digest:
8cb2555f0b16f2ccaa8646b747e598c92f0292410839032325f2624ef95c1f7c - Sigstore transparency entry: 1979905117
- Sigstore integration time:
-
Permalink:
mesutcelik/agentmint-hermes@22e889d64c05c412089a2e50db3aaedbb0b4d392 -
Branch / Tag:
refs/tags/v0.10.0 - Owner: https://github.com/mesutcelik
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@22e889d64c05c412089a2e50db3aaedbb0b4d392 -
Trigger Event:
push
-
Statement type: