AgentSet
An AgentSet declares a team of seats: named groups of AgentClaims, each group a number of identical claims for one kagent Agent.
The set creates its claims, keeps them as declared, and deletes them with itself. Each claim binds to a kagent Session of its own, so a group of two builders is two separate conversations with the same Agent.
apiVersion: kslip.dev/v1alpha1kind: AgentSetmetadata: name: checkout namespace: team-aspec: claims: - name: planner template: spec: agentRef: name: planner - name: builder replicas: 2 template: spec: agentRef: name: builder$ kubectl get agentsets,agentclaims --namespace team-aNAME CLAIMS BOUND READY AGEagentset.kslip.dev/checkout 3 3 True 2m
NAME AGENT PHASE SESSION AGEagentclaim.kslip.dev/checkout-builder-0 builder Bound 0193e3c2-6f2e-7c5a-9b1d-4d2f8a6c1e77 2magentclaim.kslip.dev/checkout-builder-1 builder Bound 0193e3c2-7a41-7e0b-8c55-91d3f0b2a6c4 2magentclaim.kslip.dev/checkout-planner-0 planner Bound 0193e3c2-5d10-7f9e-a3b7-2e6c4d8f1a09 2mspec.claims lists the groups. A set has between 1 and 64 groups.
| Field | Description |
|---|---|
name |
Name of the group, unique in the set. A DNS label of at most 63 characters. |
replicas |
Number of claims in the group, from 0 to 1000. Defaults to 1. |
template.metadata.labels |
Labels added to each claim. |
template.metadata.annotations |
Annotations added to each claim. |
template.spec |
The spec of each claim: its agentRef, rebindPolicy, and resetPolicy, as described for AgentClaim. |
The name of a set is at most 63 characters, because it labels the set’s claims.
Claims
Section titled “Claims”A claim is named <set>-<group>-<index>, with indexes counted from zero. The
names are stable: checkout-builder-0 is the same seat for as long as the set
declares it.
The set labels each claim:
| Label | Value |
|---|---|
kslip.dev/agentset-name |
The name of the set. |
kslip.dev/claim-group |
The name of the group. |
kslip.dev/claim-index |
The claim’s index in its group. |
These labels take precedence over labels of the same name in the template. To list the builders of a set:
kubectl get agentclaims --selector kslip.dev/agentset-name=checkout,kslip.dev/claim-group=builderEach claim carries an owner reference to its set, so Kubernetes deletes the claims when the set is deleted, and kslip deletes their Sessions.
Status
Section titled “Status”| Field | Description |
|---|---|
replicas |
Number of claims the set declares, across its groups. |
boundReplicas |
Number of those claims that are bound. |
claims |
The declared and bound counts of each group, in the order the spec lists the groups. |
conditions |
Ready, described below. |
Ready is True while every claim the set declares exists and is bound.
| Reason | Status | Meaning |
|---|---|---|
AllClaimsBound |
True |
Every declared claim exists and is bound. |
ClaimsPending |
False |
A declared claim is missing or unbound. The claim’s own conditions say why. |
ClaimNameTaken |
False |
An AgentClaim the set does not own has the name of one of the set’s claims. The set leaves that claim alone and creates its other claims. |
Changes
Section titled “Changes”Scaling
Section titled “Scaling”Raising replicas creates claims at the next indexes. Lowering it deletes the
claims with the highest indexes, and their Sessions with them. The claims that
remain keep their Sessions.
Removing a group deletes its claims. Adding a group creates them.
Template changes
Section titled “Template changes”A change to a group’s template is applied to the group’s claims:
- Labels, annotations,
rebindPolicy, andresetPolicychange in place. A label or annotation the template drops is removed from the claims. The claims keep their Sessions. - A change to
agentRefreplaces the group’s claims, because a claim cannot move to another Agent. Each claim is deleted with its Session, and a claim of the same name is created for the new Agent.
Resetting a seat
Section titled “Resetting a seat”Deleting a claim of a set deletes its Session. The set creates the claim again, and the seat starts over with an empty conversation:
kubectl delete agentclaim checkout-builder-0Events
Section titled “Events”| Reason | Published when |
|---|---|
ClaimCreated |
The set creates a claim. |
ClaimDeleted |
The set deletes a claim it does not declare. |
ClaimReplaced |
The set deletes a claim because its group references another Agent. |