Design phase ยท Apache 2.0

AI agents as Kubernetes workloads with a typed contract

Crewkube is an open-source framework for defining, deploying, and connecting task-focused AI agents. Start with one agent, grow into a multi-agent application, and deploy and scale each agent independently, alongside the microservices and workflow engines you already run.

Why Crewkube

Most agent frameworks are libraries: the agent lives inside one process, and deploying, securing, and scaling it is left to you. Crewkube makes each agent a Kubernetes resource.

Declarative

An agent is a YAML resource. Review it in a pull request, deploy it with GitOps, roll it back like any Deployment.

Independently deployable

Every agent has its own Pod, Service, identity, and scaling. Change one agent and only that agent rolls out.

Callable like a service

Agents expose named, versioned interfaces that services, CronJobs, CI pipelines, and workflow engines call over plain HTTP.

Explicit about access

An agent can only call the tools and peer agents it declares, and each destination decides who may call it.

Harness-agnostic

Bring the agent runtime you prefer. Any runner image that implements the runtime contract works; your callers see the same API.

Additive

Agents sit next to your microservices, MCP tool servers, and workflow engines. Nothing has to be rewritten.

A quick look

Illustrative only. The API is a draft and not yet implemented.

apiVersion: crewkube.com/v1alpha1
kind: Agent
metadata:
  name: triage
spec:
  instructions: |
    Classify incidents and recommend next steps.
  harness:
    adapter: claude-code
    image: registry.example.com/crewkube/claude-triage:0.1.0
  interfaces:
    - name: classify
      version: v1
      allowedCallers:
        - serviceAccount: incident-api
  tools:
    - name: summarizeLogs
      target:
        agent: { name: log-summary, interface: summarize }
kubectl apply -f triage.yaml
curl -X POST http://triage/v1/interfaces/classify -d '{"input": {...}}'

Core concepts

Agent
One deployable agent: instructions, model, harness, interfaces, tools, policy, workload.
Application
Optional grouping of agents with aggregate status.
Interface
A named, versioned operation an agent offers to callers.
Tool
An operation an agent may use: a peer agent, an HTTP service, an MCP tool, or a local handler.
Harness
The runtime that executes the agent loop, packaged as a runner image.
Runtime contract
The versioned HTTP contract every harness implements. It makes harnesses interchangeable.

Agents decide, workflows order. Crewkube does not replace workflow engines. When steps must run in a fixed order, with approvals or durable retries, use a workflow engine and have it call agent interfaces.

Roadmap

  1. Design Accept the architecture and runtime contract proposals.
  2. v0.1 Operator, Agent CRD, reference harness: a single callable agent.
  3. v0.2 Multi-agent: peer calls, MCP tools, caller authorization, Helm chart.
  4. v0.3 Second harness passing the runtime contract tests; workflow engine example.
  5. v1beta1 Stable API with a compatibility guarantee.