Skip to content

Add agent job execution via invoke_agent_step and ticker-echo test agent#114

Merged
nicnocquee merged 3 commits intomainfrom
agent-execute-jobs
Mar 20, 2026
Merged

Add agent job execution via invoke_agent_step and ticker-echo test agent#114
nicnocquee merged 3 commits intomainfrom
agent-execute-jobs

Conversation

@nicnocquee
Copy link
Copy Markdown
Member

Summary

Implements execution of scheduled agent steps by enqueuing one invoke_agent_step job per expanded input set from check_schedules, and adds a minimal ticker-echo agent for local scheduler testing. The worker runs each job, calls the agent HTTP endpoint, and updates AgentJobExecution status (running / failed). Schedule executions get an enqueuing status and are linked to job executions via scheduleExecutionId.

Important changes

  • hermes-worker: New invoke_agent_step job handler; invokes agent via HTTP, updates AgentJobExecution (running on start, failed on error). check_schedules now enqueues one invoke_agent_step per expanded input set via enqueueAgentJob callback.
  • hermes-scheduler: executeSchedule accepts enqueueAgentJob; creates AgentJobExecution rows and enqueues payloads (jobId, executionId, scheduleExecutionId, endpoint, body, timeoutMs). Schedule execution status set to enqueuing while jobs are enqueued; final status (success/partial/failed) still derived from job outcomes.
  • Database: AgentJobExecution gains scheduleExecutionId and relation to ScheduleExecution. ScheduleExecutionStatus gains enqueuing. Migration adds column and relation.
  • ticker-echo agent: New app under apps/agents/ticker-echo; accepts tickerId input, logs it, returns success. Used for local testing with hermes-worker (env via @workspace/env agents-ticker-echo, README and tests included).

Other changes

  • JobPayloadMap and job-payload-map include invoke_agent_step payload type.
  • Hermes-worker and execute-schedule README/docs updated for new flow.
  • Turbo config and env package updated for ticker-echo (build/tasks and env.agents.ticker-echo.example).

How to test

  1. Apply migrations: pnpm db:migrate:dev (or equivalent) so schedule_execution_id and enqueuing exist.
  2. Start ticker-echo: from repo root, pnpm --filter ticker-echo-agent dev. Use .env.local with ALLOW_ANY_BEARER_FOR_LOCAL=true and same bearer in hermes-worker’s AGENT_API_KEY.
  3. In Hermes, register agent ticker-echo@1.0.0 with endpoint http://localhost:4010, create a pipeline with one step (ticker-echo, input e.g. { "tickerId": "{{tickerId}}" }), and create a schedule (or run pipeline once).
  4. Run hermes-worker; when check_schedules runs, confirm invoke_agent_step jobs are enqueued and processed, ticker-echo logs show received tickerId, and AgentJobExecution rows move to running then completed (or failed on error).
  5. Run full test suite: pnpm code-quality (including hermes-worker and hermes-scheduler and ticker-echo tests).

…or controlled agent invocations and status updates. Update README and documentation to reflect changes. Add Prisma migrations for new scheduleExecutionId and enqueuing status in AgentJobExecution model.
…nfiguration and TypeScript support. Include README, tests, and Turbo configuration for build tasks.
@nicnocquee nicnocquee merged commit 4a11f58 into main Mar 20, 2026
2 checks passed
@nicnocquee nicnocquee deleted the agent-execute-jobs branch March 20, 2026 10:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant