Advanced Automation: Cron, MCP, and Delegation
Supercharge Hermes Agent with scheduled cron jobs, MCP server connections, and parallel subagent delegation — turning a chat agent into an autonomous system.
TLDR: Three AI automation systems turn Hermes from a chat agent into an autonomous assistant: cron jobs (scheduled recurring tasks that deliver results to your chat), MCP servers (connect external tools like databases and APIs as native agent tools), and subagent delegation (spawn parallel workers for independent subtasks). Start with cron:
hermes cron create "8am"and follow the prompts.
Key Takeaways
- Cron jobs run autonomously and deliver results to your preferred platform
- MCP servers let Hermes use external APIs and databases as native tools
- Subagent delegation parallelizes independent tasks
- Use
no_agent: truefor silent watchdog scripts - Chain jobs with
context_fromfor multi-step pipelines
Cron Jobs
The built-in cron scheduler runs tasks on a schedule and delivers results to you. Jobs run fully autonomously — no user needed at execution time.
Creating a Job
The simplest way: just ask during a session:
Create a cron job that searches for AI news every morning at 8 AM
Or create explicitly:
hermes cron create "0 8 * * *"
Scheduling Formats
| Format | Example | Meaning |
|---|---|---|
| Duration | 30m, 2h | Every 30 minutes, every 2 hours |
| Time phrase | 8am, every monday 9am | Simple English schedules |
| Cron expression | 0 9 * * 1-5 | Standard 5-field cron |
| ISO timestamp | 2026-06-01T09:00:00 | Run once at a specific time |
Job Configuration
Each job has several powerful knobs:
- Prompt — what the agent does each tick (must be self-contained)
- Skills — preload specific skills for the job
- Model — per-job model override
- Script — data-collection script that runs before the agent prompt
- Workdir — run in a specific project directory
- Delivery — where results go (default: your current chat)
- Context from — chain job A’s output into job B
Managing Jobs
hermes cron list # List all jobs
hermes cron edit JOB_ID # Edit a job
hermes cron pause JOB_ID # Pause a job
hermes cron resume JOB_ID # Resume a paused job
hermes cron remove JOB_ID # Delete a job
hermes cron status # Scheduler health
The No-Agent Watchdog Pattern
For simple, repetitive checks that need zero reasoning, use no_agent: true:
{
"schedule": "5m",
"script": "~/.hermes/scripts/disk_watchdog.sh",
"no_agent": true
}
The script runs directly. If it produces stdout, that’s the message. If it produces nothing (silent success), nobody gets notified. This is ideal for threshold monitors — disk space, memory, process health, API uptime.
MCP Servers
The Model Context Protocol lets Hermes connect to external services as native tools. Think of it as a universal plugin system for AI agents.
Adding a Server
# HTTP-based MCP server
hermes mcp add my-server --url http://localhost:8000/mcp
# Command-based MCP server
hermes mcp add my-server --command "npx @modelcontextprotocol/server-postgres"
Managing MCP Servers
hermes mcp list # Show all configured servers
hermes mcp test my-server # Test the connection
hermes mcp configure my-server # Toggle which tools to expose
hermes mcp remove my-server # Remove a server
Run Hermes as an MCP Server
hermes mcp serve
This lets other MCP clients (Claude Desktop, Cursor, another AI agent) talk to Hermes and use its tools.
Use Cases
- Database access — connect to PostgreSQL or SQLite
- External APIs — wrap any REST API as an MCP tool
- Custom tooling — expose internal scripts
- Cross-agent communication — two Hermes instances talking via MCP
Subagent Delegation
For tasks that benefit from parallel execution, Hermes spawns subagents — independent agent instances working on subtasks.
When to Use Delegation
| Use case | Why parallel helps |
|---|---|
| Research + implementation | One researches, another builds simultaneously |
| Multi-file code review | Each agent reviews different files in parallel |
| Parallel testing | Agents run tests on different modules |
| Independent analysis | Both tasks need full tool access |
Limitations
- Subagents run synchronously — parent waits for children
- Subagents cannot delegate further (by default)
- Not durable — if parent is interrupted, children are cancelled
- For durable background work, use cron jobs or
terminal(background=true)
Worktree Mode
When multiple agents work on the same git repo:
hermes -w # Each session gets its own git worktree
This prevents conflicts — each agent works on an isolated checkout.
Example: Daily Research Pipeline
Here’s how you combine all three systems:
- MCP for database access:
hermes mcp add research-db --url http://localhost:3000/mcp - Cron for data collection: Every 6 hours, a job reads from the MCP-connected database, runs analysis, saves to a shared file
- Cron for reporting: Another job runs every morning, reads collected data, formats a summary, delivers to Telegram
- Delegated deep dives: When you ask “analyze this quarter’s trends,” Hermes spawns 3 subagents in parallel — user data, revenue, product metrics — then synthesizes
This turns Hermes from a Q&A tool into an autonomous research system.
FAQ
Q: Can cron jobs use skills?
Yes — pass --skills when creating the job, or set them in the job config. The agent loads those skills before executing each tick.
Q: What happens if a cron job fails?
The job retries on the next scheduled tick. Check hermes cron log JOB_ID for error details. Failed runs don’t cascade — each tick is independent.
Q: Can I chain cron jobs together?
Yes — use context_from: ["job_a"] on job B. Job B receives job A’s most recent output as context before running.
Q: Do subagents have access to all my tools?
Subagents inherit the parent’s toolset, config, and environment. They cannot use delegate_task, clarify, or memory by default (leaf role). You can configure orchestrator role for deeper nesting.
Next Steps
- Review the Skills System and create a cron-job-deployment skill
- Check the CLI Mastery guide for session management tips
- Visit the official Configuration docs