The jobs endpoints let you submit new workflows, track running jobs, retrieve detailed state and event history, and cancel jobs that are in progress. Every job is identified by a unique job_id returned at submission time.
Submit a job
The request body must be a fully resolved JSON manifest — the same structure you would put in a manifest.json file. MirrorNeuron validates the manifest before creating the job.
Provide a JSON manifest in the request body. On success, MirrorNeuron immediately returns a job_id and an initial status of pending.
Request body
Manifest schema version. Use "1.0".
Unique identifier for the workflow graph. Used as a prefix in the generated job_id.
List of node_id values that receive the initial message when the job starts.
Array of agent node definitions that make up the workflow graph. Unique identifier for this node within the graph.
Built-in agent type: router, executor, aggregator, or sensor.
Optional role hint such as root_coordinator.
Example request
curl -X POST http://localhost:4000/api/v1/jobs \
-H "Content-Type: application/json" \
-d '{
"manifest_version": "1.0",
"graph_id": "simple",
"entrypoints": ["router"],
"nodes": [
{
"node_id": "router",
"agent_type": "router",
"role": "root_coordinator"
}
]
}'
Response
201 Created
The generated job ID. Formatted as {graph_id}-{unique_suffix}.
Initial job status. Always "pending" immediately after submission.
{
"id" : "simple-12345..." ,
"status" : "pending"
}
400 Bad Request — returned when the JSON body is missing, empty, or contains an invalid manifest.
{
"error" : "Invalid or missing JSON payload"
}
List jobs
Returns a paginated list of job summaries. By default, all jobs including terminal states are returned. Use query parameters to filter the results.
Query parameters
Maximum number of jobs to return. Omit to return all jobs.
When set to false, completed, failed, and cancelled jobs are excluded from the response.
Example request
curl -s "http://localhost:4000/api/v1/jobs?limit=5"
Response
200 OK
Array of job summary objects. Show job summary properties
The workflow graph ID from the manifest.
Current job status: pending, running, queued, completed, failed, or cancelled.
ISO 8601 timestamp of when the job was submitted.
ISO 8601 timestamp of the last status update.
{
"data" : [
{
"job_id" : "prime_sweep_40_workers-..." ,
"graph_id" : "prime_sweep_40_workers" ,
"status" : "completed" ,
"submitted_at" : "2026-03-28T11:00:00.000Z" ,
"updated_at" : "2026-03-28T11:00:12.000Z"
}
]
}
Get job details
Returns the full monitor detail view for a single job, including the job record, a summary, all agent snapshots, recent events, and sandbox state.
Path parameters
The job ID returned when the job was submitted.
Example request
curl -s http://localhost:4000/api/v1/jobs/prime_sweep_40_workers-...
Response
200 OK
The persisted job record. The workflow graph ID from the manifest.
Optional display name for the job. May be null.
ISO 8601 submission timestamp.
ISO 8601 last-update timestamp.
Node placement strategy, e.g. "local".
Failure recovery strategy, e.g. "local_restart".
IDs of the root agents (entrypoints) for this job.
Final result payload once the job completes.
Reference to the manifest used to create this job. Show manifest_ref properties
Graph ID from the manifest.
Absolute path to the manifest file on the node.
Absolute path to the job bundle folder.
Aggregated runtime summary for the job (executor counts, active nodes, sandbox names, last event).
Array of agent snapshot objects for all agents in this job. Unique agent identifier within the job.
Built-in agent type: router, executor, aggregator, or sensor.
Agent template type, e.g. "map", "reduce", "batch".
The cluster node this agent is running on.
Whether the agent process is currently active.
Number of messages this agent has processed.
Number of messages currently waiting in the agent’s mailbox.
Whether the agent is paused.
Last error message, if any.
Name of the currently active sandbox container, if applicable.
Current execution lease, if the agent holds one.
The most recent events for this job (up to 25 by default).
Active sandbox container records associated with this job.
404 Not Found — returned when the job ID does not exist or is not visible in the connected cluster.
{
"error" : "Job prime_sweep_40_workers-... was not found"
}
Cancel a job
POST /api/v1/jobs/:job_id/cancel
Sends a cancellation signal to a running job. The job transitions to cancelled status.
Path parameters
The ID of the job to cancel.
Example request
curl -X POST http://localhost:4000/api/v1/jobs/prime_sweep_40_workers-.../cancel
Response
200 OK
Confirmation status. Always "cancelled" on success.
The ID of the cancelled job.
{
"status" : "cancelled" ,
"job_id" : "prime_sweep_40_workers-..."
}
404 Not Found — returned when the job ID does not exist.
{
"error" : "Job prime_sweep_40_workers-... was not found"
}
Get job events
GET /api/v1/jobs/:job_id/events
Returns the full Redis-backed event history for a job. Events are appended in order as the runtime processes messages, completes sandboxes, and transitions job state.
Path parameters
The ID of the job whose events you want to retrieve.
Example request
curl -s http://localhost:4000/api/v1/jobs/prime_sweep_40_workers-.../events
Response
200 OK
Array of event objects in chronological order. ISO 8601 timestamp of when the event was recorded.
Event type identifier, e.g. "sandbox_job_completed".
The agent that emitted this event.
Event-specific payload data. Show example payload properties (sandbox_job_completed)
Name of the sandbox container that completed.
Process exit code from the sandbox run.
The executor pool the sandbox ran in.
{
"data" : [
{
"timestamp" : "2026-03-28T11:00:04.000Z" ,
"type" : "sandbox_job_completed" ,
"agent_id" : "prime_worker_0001" ,
"payload" : {
"sandbox_name" : "mirror-neuron-job-..." ,
"exit_code" : 0 ,
"pool" : "default"
}
}
]
}
404 Not Found — returned when the job ID does not exist.
{
"error" : "Job prime_sweep_40_workers-... was not found"
}