Skip to main content
The Agent CRD is the core building block of Flokoa. It represents a fully deployable AI agent inside your Kubernetes cluster, combining container runtime configuration with LLM model references, tool bindings, and A2A (Agent-to-Agent) protocol metadata. When you apply an Agent manifest, the Flokoa operator reconciles it into a Kubernetes Deployment, creates a Service, and continuously reports the agent’s lifecycle state back through the resource’s status fields.

API reference


Minimal configuration

Every Agent requires a runtime block with a type and at least one container definition. The example below is the smallest valid manifest you can apply:

Runtime modes

Flokoa supports two runtime modes. Use standard when you are bringing your own agent image, and template when you want the operator to manage the runtime for you.
In standard mode you provide your own container image. The operator wraps it in a Deployment and Service, but all application logic lives in your image.

Spec reference

The card block exposes your agent via the A2A (Agent-to-Agent) protocol and is the primary way other agents and orchestrators discover your agent’s capabilities.Each skill in skills has:
The runtime block controls how your agent is deployed.
Attach a Model CR so your agent has access to an LLM at runtime. The operator injects the necessary connection details as environment variables.
Attach a system prompt either inline or by referencing an existing Instruction CR. Supported in both standard and template runtime modes.
Tools give your agent access to external APIs. You can reference an existing AgentTool CR or define a tool inline.
Explicitly declaring the AI framework lets Flokoa and your observability stack identify the agent’s type in logs and metrics.
Supported values: pydantic-ai, langchain, google-adk, crewai, marvin, autogen, a2a

Status fields

The operator writes the following fields to status after reconciling an Agent:

Production example

The following manifest deploys a highly available agent with health probes, resource limits, and pod anti-affinity:

kubectl operations


Best practices

  1. Always set resource requests and limits to prevent agents from starving or monopolising cluster nodes.
  2. Add liveness and readiness probes so Kubernetes can route traffic only to healthy replicas and self-heal on crashes.
  3. Run at least two replicas in production and combine with pod anti-affinity to spread them across zones.
  4. Declare the framework explicitlyspec.framework improves observability and future tooling integration.
  5. Never put secrets in the Agent spec — use secretKeyRef in env or a mounted Kubernetes Secret volume.
  6. Set container security contexts — run as non-root with readOnlyRootFilesystem: true and drop all capabilities.
  7. Pin image tags — avoid latest in production so rollbacks are predictable.
  8. Use standard mode for custom logic, template mode for prompt-driven agents — pick the mode that matches your workload.
  9. Share Model and AgentTool CRs across agents using cross-namespace references to reduce duplication.
  10. Start minimal and iterate — validate a one-replica, no-probe configuration before adding production hardening.

Troubleshooting

The most common causes are an inaccessible container image or insufficient cluster resources.
  • Confirm the image tag exists in the registry.
  • If using a private registry, ensure imagePullSecrets is set.
  • Check that nodes have sufficient CPU and memory with kubectl describe nodes.
  • Check that all secretKeyRef secrets exist in the correct namespace.
  • Verify health probe paths (/health, /ready) are implemented in your image.
  • Ensure resource limits are not too low — OOMKilled pods show reason: OOMKilled in status.containerStatuses.
  • Increase CPU/memory requests and limits if the pod is being throttled.
  • Scale out replicas if all pods are consistently high on CPU.
  • Check tool call latency — slow external APIs directly impact agent response time.
  • If the Service is missing, check operator logs: kubectl logs -n flokoa-system deploy/flokoa-operator.
  • Review NetworkPolicies that may be blocking traffic to or from the agent pods.