feat(webapi): add /api/jobs endpoint to expose cron jobs to UI#2111
Closed
nock4 wants to merge 9 commits into
Closed
feat(webapi): add /api/jobs endpoint to expose cron jobs to UI#2111nock4 wants to merge 9 commits into
nock4 wants to merge 9 commits into
Conversation
…reaming, memory, skills, config endpoints
…ex auth auto-sync - Add webapi to setuptools packages.find + hermes-webapi CLI entry point - Add fastapi/uvicorn to core dependencies - Auto-detect port (8642 → 8643 fallback) when gateway occupies 8642 - Auto-sync Codex credentials from ~/.codex/auth.json when newer than Hermes store
…tipart content builder
… re-stringifying image data
- Add new router at /api/jobs with full CRUD operations - Transform cron job format for workspace compatibility - Include security hardening: * Job ID format validation (12 hex chars) * Path traversal protection for output logs * Input validation (schedule, deliver, lengths) * Optional prompt threat scanning via _scan_cron_prompt - Implement action endpoints: pause, resume, run, output - Register router in webapi/app.py This allows the Hermes Workspace Jobs tab to display and manage both skill-based jobs and system cron jobs in a unified view. Closes #<issue-number-if-any>
teknium1
added a commit
that referenced
this pull request
Mar 22, 2026
CRUD + actions for cron jobs on the existing API server (port 8642):
GET /api/jobs — list jobs
POST /api/jobs — create job
GET /api/jobs/{id} — get job
PATCH /api/jobs/{id} — update job
DELETE /api/jobs/{id} — delete job
POST /api/jobs/{id}/pause — pause job
POST /api/jobs/{id}/resume — resume job
POST /api/jobs/{id}/run — trigger immediate run
All endpoints use existing API_SERVER_KEY auth. Job ID format
validated (12 hex chars). Logic ported from PR #2111 by nock4,
adapted from FastAPI to aiohttp on the existing API server.
Contributor
|
The jobs CRUD logic was ported to our existing aiohttp API server in PR #2450 (179 lines vs the full 1974-line FastAPI server). Same endpoints, same validation, no new dependencies. Thanks for the well-structured route logic! |
outsourc-e
pushed a commit
to outsourc-e/hermes-agent
that referenced
this pull request
Mar 26, 2026
CRUD + actions for cron jobs on the existing API server (port 8642):
GET /api/jobs — list jobs
POST /api/jobs — create job
GET /api/jobs/{id} — get job
PATCH /api/jobs/{id} — update job
DELETE /api/jobs/{id} — delete job
POST /api/jobs/{id}/pause — pause job
POST /api/jobs/{id}/resume — resume job
POST /api/jobs/{id}/run — trigger immediate run
All endpoints use existing API_SERVER_KEY auth. Job ID format
validated (12 hex chars). Logic ported from PR NousResearch#2111 by nock4,
adapted from FastAPI to aiohttp on the existing API server.
angelburgosrosado
pushed a commit
to angelburgosrosado/hermes-agent
that referenced
this pull request
Apr 27, 2026
CRUD + actions for cron jobs on the existing API server (port 8642):
GET /api/jobs — list jobs
POST /api/jobs — create job
GET /api/jobs/{id} — get job
PATCH /api/jobs/{id} — update job
DELETE /api/jobs/{id} — delete job
POST /api/jobs/{id}/pause — pause job
POST /api/jobs/{id}/resume — resume job
POST /api/jobs/{id}/run — trigger immediate run
All endpoints use existing API_SERVER_KEY auth. Job ID format
validated (12 hex chars). Logic ported from PR NousResearch#2111 by nock4,
adapted from FastAPI to aiohttp on the existing API server.
02356abc
pushed a commit
to 02356abc/hermes-agent
that referenced
this pull request
May 14, 2026
CRUD + actions for cron jobs on the existing API server (port 8642):
GET /api/jobs — list jobs
POST /api/jobs — create job
GET /api/jobs/{id} — get job
PATCH /api/jobs/{id} — update job
DELETE /api/jobs/{id} — delete job
POST /api/jobs/{id}/pause — pause job
POST /api/jobs/{id}/resume — resume job
POST /api/jobs/{id}/run — trigger immediate run
All endpoints use existing API_SERVER_KEY auth. Job ID format
validated (12 hex chars). Logic ported from PR NousResearch#2111 by nock4,
adapted from FastAPI to aiohttp on the existing API server.
olympus-terminal
pushed a commit
to olympus-terminal/hermes-agent
that referenced
this pull request
May 16, 2026
CRUD + actions for cron jobs on the existing API server (port 8642):
GET /api/jobs — list jobs
POST /api/jobs — create job
GET /api/jobs/{id} — get job
PATCH /api/jobs/{id} — update job
DELETE /api/jobs/{id} — delete job
POST /api/jobs/{id}/pause — pause job
POST /api/jobs/{id}/resume — resume job
POST /api/jobs/{id}/run — trigger immediate run
All endpoints use existing API_SERVER_KEY auth. Job ID format
validated (12 hex chars). Logic ported from PR NousResearch#2111 by nock4,
adapted from FastAPI to aiohttp on the existing API server.
gweeteve
pushed a commit
to gweeteve/hermes-agent
that referenced
this pull request
Jun 2, 2026
CRUD + actions for cron jobs on the existing API server (port 8642):
GET /api/jobs — list jobs
POST /api/jobs — create job
GET /api/jobs/{id} — get job
PATCH /api/jobs/{id} — update job
DELETE /api/jobs/{id} — delete job
POST /api/jobs/{id}/pause — pause job
POST /api/jobs/{id}/resume — resume job
POST /api/jobs/{id}/run — trigger immediate run
All endpoints use existing API_SERVER_KEY auth. Job ID format
validated (12 hex chars). Logic ported from PR NousResearch#2111 by nock4,
adapted from FastAPI to aiohttp on the existing API server.
Egavasyug
pushed a commit
to Egavasyug/hermes-agent
that referenced
this pull request
Jun 10, 2026
CRUD + actions for cron jobs on the existing API server (port 8642):
GET /api/jobs — list jobs
POST /api/jobs — create job
GET /api/jobs/{id} — get job
PATCH /api/jobs/{id} — update job
DELETE /api/jobs/{id} — delete job
POST /api/jobs/{id}/pause — pause job
POST /api/jobs/{id}/resume — resume job
POST /api/jobs/{id}/run — trigger immediate run
All endpoints use existing API_SERVER_KEY auth. Job ID format
validated (12 hex chars). Logic ported from PR NousResearch#2111 by nock4,
adapted from FastAPI to aiohttp on the existing API server.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new
/api/jobsendpoint to the Hermes WebAPI that exposes cron job management capabilities to the Workspace UI.Changes
GET /api/jobs- Lists all cron jobs (with optionalinclude_disabled)POST /api/jobs- Create new cron jobs with full validationGET /api/jobs/{id}- Fetch single jobPATCH /api/jobs/{id}- Partial updates (schedule, name, prompt, etc.)DELETE /api/jobs/{id}- Remove a jobPOST /api/jobs/{id}/pause- Pause a jobPOST /api/jobs/{id}/resume- Resume a paused jobPOST /api/jobs/{id}/run- Trigger immediate executionGET /api/jobs/{id}/output- Retrieve recent output logs (with path traversal protection)Security Hardening
_scan_cron_prompt(if available)local,origin,telegram,discord,slackMotivation & Context
The Hermes Workspace Jobs tab previously only showed skill-based jobs. This change unifies the view, allowing both skill jobs and system cron jobs to be managed from one place.
Testing
Checklist
Closes #XXXX (if applicable)