ArkService

ArkService is analogous to a Kubernetes Service. It routes incoming tasks to available agent instances, decoupling task producers from the agent pool. An ArkService selects a target ArkAgent and distributes tasks across ready pods using a configurable load balancing strategy.


Example

apiVersion: arkonis.dev/v1alpha1
kind: ArkService
metadata:
  name: research-service
  namespace: default
spec:
  selector:
    arkAgent: research-agent
  routing:
    strategy: least-busy
  ports:
    - protocol: HTTP
      port: 8081

Routing strategies

Strategy Behavior
round-robin Distributes tasks sequentially across all ready pods. Simple and predictable.
least-busy Routes each task to the pod with the fewest active tasks. Best for tasks with variable duration.
random Selects a ready pod at random. Useful for even distribution without tracking state.

Only pods with a passing /readyz check are eligible. Pods that fail the semantic readiness probe are excluded from routing until they recover.


Spec fields

Field Type Required Description
selector.arkAgent string yes Name of the ArkAgent in the same namespace to route tasks to
routing.strategy string no round-robin (default), least-busy, or random
ports[].protocol string yes HTTP — external task submission; A2A — agent-to-agent communication
ports[].port int yes Port number

Status

Field Type Description
readyReplicas int32 Number of ready agent pods currently receiving tasks
conditions []Condition Standard Kubernetes conditions

See also

  • ArkAgent — the agent pool that ArkService routes to
  • ArkTeam — for multi-agent pipelines, use ArkTeam instead of wiring ArkServices manually

Apache 2.0 · ARKONIS