Principle:A5c ai Babysitter Kubernetes Job Dispatch
| Knowledge Sources | |
|---|---|
| Domains | Kubernetes, Job_Dispatch |
| Last Updated | 2026-10-23 00:00 GMT |
Overview
A method for creating and submitting Kubernetes Jobs for agent dispatch with workspace mounts, transport env vars, and budget enforcement deadlines.
Description
Kubernetes Job Dispatch is the principle of running AI agents as Kubernetes batch/v1 Jobs rather than subprocesses or HTTP calls. The Job manifest includes:
- Workspace PVC mounted at /workspace
- Transport env vars (AGENT_MUX_TRANSPORT, TRANSPORT_MUX_CODEC)
- Callback URL (KRADLE_CALLBACK_URL) for result collection
- activeDeadlineSeconds derived from the budget to enforce time limits
- Model API key secret reference
After creation, the Job is submitted to the Kubernetes API and the agent pod executes, posting results back via the callback URL.
Usage
Use this principle when dispatching AI agents in Kubernetes where isolation, volume mounting, and budget-based deadlines are required.
Theoretical Basis
The Job creation is a manifest generation + API submission:
job = createAgentJob(execConfig, workspace, budget) -> batch/v1 Job manifest
result = submitAgentJob(job) -> { jobName, namespace }
// Pod runs, posts results to KRADLE_CALLBACK_URL
Key property: The activeDeadlineSeconds field on the Job enforces the budget deadline at the Kubernetes level — the pod is killed if it exceeds the time limit, regardless of application-level checks.