Krizaka
Documentation
Core features

Jobs, Schedules & Automation

For developers

Everything that runs without a user waiting: the job plane and its executors, every scheduled task of the platform, the automation connectors and the CLI agent. Generated from the code.

🤖 Generated from code by scripts/generate-docs.mjs — do not hand-edit. Run orazaka docs build to refresh.

Three mechanisms run work in the background, each with one owner:

  • The job plane (orazaka-job-service) — asynchronous AI work: a capability is published as a job on RabbitMQ and executed in process or by a worker. Studio runs and ASYNC intentions use it.
  • Scheduled tasks — sweepers and probes inside each service (@Scheduled), configured by properties.
  • Automation (orazaka-automation-service) — connector actions (Slack, Jira, the CLI agent…) and its Quartz scheduler.

The job plane

Asynchronous RabbitMQ listener that consumes task execution requests. Manages the state of jobs from PENDING → PROCESSING → COMPLETED or FAILED. Delegates feature-specific execution to the registered JobExecutor whose handlerKey() matches the capability's handler_key column. The executors arrive by the AutoConfiguration SPI, so an out-of-tree jar contributes one without touching this class (ADR-038).

A capability row (orazaka_capabilities) says where a job goes (routing_key, the queue a process drains) and which code runs it (handler_key). Both are data: a pack adds a capability with a row, not a deploy.

CapabilityHandlerRouting keyRuns in
orazaka.studio.media.composemedia.composejob.compose.assemblea worker (see the worker protocol)
orazaka.core.media.visionimage.analyzejob.media.analyzeVisionAnalysisStrategy (in process)
orazaka.core.media.audio.analysisaudio.analyzejob.media.generateAudioAnalysisStrategy (in process)
orazaka.core.media.imageimage.generatejob.media.generateImageGenerationStrategy (in process)
orazaka.core.media.video.analysisvideo.analyzejob.media.generateVideoAnalysisStrategy (in process)
orazaka.core.chat.completiontext.generatejob.text.processChatGenerationStrategy (in process)
orazaka.core.media.speechspeech.synthesizejob.text.processSpeechSynthesisStrategy (in process)
orazaka.core.media.videovideo.generatejob.video.generatea worker (see the worker protocol)

In-process executors

One capability's execution, in process.

Handler keyExecutorRepositorySummary
audio.analyzeAudioAnalysisStrategyorazaka-job-serviceExecutes audio transcription/analysis jobs by delegating to the AudioPreProcessor.
image.analyzeVisionAnalysisStrategyorazaka-job-serviceExecutes vision/image analysis jobs using the AI chat client with vision models.
image.generateImageGenerationStrategyorazaka-job-serviceExecutes image generation jobs via the AI client's image endpoint.
speech.synthesizeSpeechSynthesisStrategyorazaka-job-serviceExecutes text-to-speech synthesis jobs via the AI client's audio endpoint.
text.generateChatGenerationStrategyorazaka-job-serviceDefault fallback strategy for text/chat generation jobs.
video.analyzeVideoAnalysisStrategyorazaka-job-serviceExecutes video analysis jobs by delegating to the VideoPreProcessor.

Capability and worker registries

Service-to-service (SERVICE token): how a pack registers a capability and a worker announces itself.

MethodPathSummary
DELETE/internal/v1/capabilities/{featureKey}Removes one capability.
PUT/internal/v1/capabilities/{featureKey}Registers or replaces one capability a pack contributes.
GET/internal/v1/capabilities/{featureKey}/routeResolves where one capability's work is executed.
POST/internal/v1/workersRegisters a worker, or refreshes what is known about it.
POST/internal/v1/workers/{workerName}/heartbeatRecords a heartbeat from an already-registered worker.

Following and approving jobs

MethodPathAccessSummary
GET/api/v1/jobsauthenticatedRetrieves a paginated list of jobs for the authenticated user (or all jobs for admins).
GET/api/v1/jobs/{id}ADMIN + USERFetches the single, atomic state of a specific job.
POST/api/v1/jobs/{id}/progresspublicUpdates progress of a running job and broadcasts it to connected users.
POST/api/v1/jobs/{jobId}/approveADMIN + USERApproves a pending automation job and dispatches its payload to the execution queue.
POST/api/v1/jobs/{jobId}/revokeADMIN + USERRevokes a pending automation job, preventing its execution.
GET/api/v1/jobs/active-connectionsADMINRetrieves the current active SSE connection count.
POST/api/v1/jobs/purgeADMINPurges jobs, chat sessions and rate-limit cache for the default test accounts.
GET/api/v1/jobs/streamADMIN + USERRegisters a Server-Sent Events stream for real-time job status notifications.

Scheduled tasks

Every @Scheduled method of the platform. A property in parentheses overrides the interval (or cron) in the service's application.yml or environment.

RepositoryTaskScheduleWhat it does
krizaka-billingHoldSweeper.sweepevery 60 s (krizaka.billing-service.sweeper.interval)Time-triggered inbound adapter: releases ACTIVE holds that outlived their TTL.
orazaka-ai-engineInfrastructureProber.probeVideoInfrastructureevery 5 s (orazaka.core.video.probing.interval-ms)Periodically pings the configured video port to check if the video inference engine is responsive.
orazaka-ai-engineInfrastructureProber.probeImageInfrastructureevery 5 s (orazaka.core.image.probing.interval-ms)Periodically pings the configured image port to check if the image inference engine (Stable Diffusion) is responsive.
orazaka-ai-engineSandboxEvictionScheduler.evictExpiredSandboxesevery 60 sScheduled eviction process — prunes expired or orphaned jobId sandbox contexts from memory.
orazaka-conversation-serviceJobReconciliationService.reconcileScheduledevery 60 s (orazaka.jobs.reconcile-interval-ms)Recovers jobs whose result was written to disk but whose terminal status update never reached the database (e.g.
orazaka-conversation-serviceJobStreamService.sendHeartbeatsevery 15 sService managing client Server-Sent Events (SSE) connections for real-time job lifecycle updates.
orazaka-job-serviceJobRetentionSweeper.sweepevery 60 s (orazaka.jobs.retention-sweep-interval)Runs the job plane's retention on a fixed delay (ADR-065).
orazaka-job-serviceWorkerHeartbeatSweeper.markStaleWorkersevery 30 s (orazaka.jobs.worker-sweeper-interval)Marks workers that have stopped heartbeating as STALE.
orazaka-job-serviceWorkerSelfRegistration.heartbeatevery 30 s (orazaka.jobs.worker-heartbeat-interval)Registers the job service in the worker registry from its own worker.yaml.
orazaka-studioPackBootstrap.installevery 30 s (orazaka.studio-service.packs.bootstrap-interval)Installs the packs this deployment ships, so a fresh environment has Studios (ADR-068, #45).
orazaka-studioRetentionSweeper.purgecron 0 30 3 * * * (orazaka.studio-service.retention.cron)Purges what the retention window says may no longer be kept (ADR-034 §14, GDPR / Loi 25).
orazaka-studioRunSweeper.sweepevery 60 s (orazaka.studio-service.sweeper.interval)Closes runs whose steps stopped reporting, and releases their holds.

Automation

Connector actions are jobs too: a producer publishes on job.automation.* (exchange orazaka.jobs), the automation service consumes orazaka.jobs.automation (failures dead-letter to orazaka.jobs.automation.dlq), runs the connector and reports each state change on evt.automation.telemetry (exchange orazaka.events).

ProducerRepositoryRouting key
AmqpStepExecutionAdapterorazaka-studiojob.automation.approved
ConnectorBehaviour
JIRAlogs the action (no outbound call yet)
WHATSAPPlogs the action (no outbound call yet)
MESSENGERlogs the action (no outbound call yet)
SLACKlogs the action (no outbound call yet)
CLI_AGENTforwarded to the user's CLI agent on job.agent.dispatch.{userId}

Automation job states: PENDING_APPROVAL · APPROVED · RUNNING · COMPLETED · FAILED · AWAITING_CLI_EXECUTION.

The CLI agent runs on the user's machine and connects outbound (no inbound port):

orazaka login
orazaka agent listen   # Start CLI agent listener and reverse tunnel
MethodPathAccessSummary
POST/api/v1/agent/reportauthenticatedReceives execution reports from the CLI agent after local task completion.
GET/api/v1/agent/streamauthenticatedEstablishes a persistent SSE stream for the CLI agent.

The service embeds a Quartz scheduler (OrazakaAutomationScheduler): JDBC job store in its own database, 5 threads, clustered: false.

Product overview →

On this page