Deploy an agent
Goal: get your own agent image running as a governed, autoscaled service.
Prerequisites: the platform installed; a namespace you can write to; a model available via a
ModelRoute; your agent packaged on a supported base image.
1. Describe the agent
Section titled “1. Describe the agent”An agent is one resource. The minimum is an image and an execution model:
apiVersion: agents.ctxmesh.ai/v1beta1kind: AgentDeploymentmetadata: name: support-agent namespace: my-teamspec: image: ghcr.io/my-org/support-agent:1.0.0 executionModel: serving # serving | eventing | job # The model is chosen in your code by calling MODEL_GATEWAY_URL with model="<ModelRoute name>". scaling: min: 0 # scale to zero when idle (default) max: 3Apply it:
kubectl apply -f support-agent.yaml2. Watch it come up
Section titled “2. Watch it come up”kubectl get agentdeployment support-agent -n my-team -w# Ready transitions to True once the serving revision is up.kubectl get agentdeployment support-agent -n my-team \ -o jsonpath='{.status.conditions[?(@.type=="Ready")].status} {.status.url}{"\n"}'The controller injects the gateway URL + launcher config, wires tracing, and reports readiness and the
serving URL on status.
3. Talk to it
Section titled “3. Talk to it”Send a request to status.url (or use the console Playground). Every turn is traced — open the
agent’s runs in the console to see the step → tool → model tree, cost, and any guardrail decisions.
4. Attach governance (by reference)
Section titled “4. Attach governance (by reference)”Governance is opt-in and reusable. Author the policies once (see the linked guides) and reference them:
spec: image: ghcr.io/my-org/support-agent:1.0.0 executionModel: serving guardrailPolicyRef: default-guardrails # content rules — /guides/guardrails/ approvalPolicyRef: sensitive-tools # human approval — /guides/approvals/ evalSuiteRef: support-quality # gate releases — /guides/evals-and-the-deploy-gate/ feedbackStoreRef: support-feedback # feedback model — /guides/feedback-and-improvement/ sessionMemory: scope: session # per-conversation memory — /guides/memory-and-sessions/A dangling reference fails closed: the agent goes Ready=False and is held rather than served
ungoverned.
When to use / when not
Section titled “When to use / when not”servingfor interactive request/response agents;eventingfor async/event-driven work;jobfor batch. See Execution models.- Leave
scaling.min: 0for scale-to-zero unless you need warm capacity (cold-start latency vs cost).
Defaults
Section titled “Defaults”executionModeldefaults toserving;scalingdefaults tomin: 0,max: 3.- No
evalSuiteRef⇒ no deploy gate (zero overhead). No policy refs ⇒ today’s ungoverned behavior.
Failure modes
Section titled “Failure modes”- Image pull / crash → the revision is not
Ready;kubectl describe+ the pod logs show why. - Dangling policy ref →
Ready=Falsewith the reason on the condition (fix or remove the ref). - Model alias unresolved (no matching
ModelRoute) → model calls fail fast at the gateway.
Connect a model provider · Guardrails · Gate a release on an eval suite · AgentDeployment reference