Skip to content

demo: add actors by default in claude multiplex - #2982

Closed
Adam Wathieu (adamwathieu) wants to merge 1 commit into
agent-substrate:mainfrom
adamwathieu:claude-demo-fix
Closed

Adam Wathieu (adamwathieu) wants to merge 1 commit into
agent-substrate:mainfrom
adamwathieu:claude-demo-fix

Conversation

@adamwathieu

Copy link
Copy Markdown
Contributor

Fix the "no agents available in namespace" error in claude multiplex demo

Since #1523, the template reconciler deletes the temporary golden actor once the golden snapshot tag is published in cmd/ateapi/internal/controlapi/actor_template.go:

if _, err := s.DeleteActor(ctx, &ateapipb.DeleteActorRequest{Actor: goldenRef, AnyState: true}); err != nil && status.Code(err) != codes.NotFound {
		return nil, fmt.Errorf("while deleting golden actor: %w", err)
	}

claudemultiplex.Deploy creates 3 ActorTemplates (agent-luna, agent-mars, agent-orion) and waited for their golden snapshots without ever creating the actual actors, depending on the template reconciler to not delete the actors. The demo regressed after the change and we still see no actors when we run the demo

ANTHROPIC_API_KEY="${ANTHROPIC_API_KEY:-dummy-key}" \
 ./hack/install-ate-kind.sh --deploy-demo-claude-code-multiplex
kubectl ate get actors -a claude-multiplex-demo

Make the demo spin up the three actors (luna, mars, orion) after deploying the actortemplates in Deploy().

After the fix:

kubectl ate get actors -a claude-multiplex-demo
ATESPACE                NAME    TEMPLATE                            STATE                   WORKER POD   WORKER IPS   VERSION   AGE
claude-multiplex-demo   luna    claude-multiplex-demo/agent-luna    ACTOR_STATE_SUSPENDED   <none>                    1         8s
claude-multiplex-demo   mars    claude-multiplex-demo/agent-mars    ACTOR_STATE_SUSPENDED   <none>                    1         8s
claude-multiplex-demo   orion   claude-multiplex-demo/agent-orion   ACTOR_STATE_SUSPENDED   <none>      

AI use: AI created the fix, I reviewed it.

Create the three Actor by default (luna, mars, orion).
@bowei Bowei Du (bowei) added area/demos kind/bug Something isn't working / bugfixes labels Oct 27, 2026
Eitan Yarmush (EItanya) pushed a commit to kagent-dev/substrate that referenced this pull request Nov 3, 2026
The claude-code-multiplex demo doesn't work as written:

1. `deploy demo claude-code-multiplex` creates the three agent templates
but no actors, so the dashboard has no agents and "Give a task" fails
with `no agents available in namespace`.
2. Even with actors created by hand, the agents can't reach the
Anthropic API. Every actor starts with **no egress policy**, and the
egress gateway blocks all traffic.
3. The WorkerPool sets no resource limits, so each pod advertises the
whole node and all three agents run at once. The demo is about a third
agent waiting for a free pod, and that never happens.

How this PR fixes it:

- It builds on Adam's change from agent-substrate#2982 is folded in, with him as
co-author. Deploy creates the three actors, the dashboard resumes an
agent when its task starts and suspends it when the task ends, and each
pod is sized for one agent.
- When both pods are busy, a new task stays queued until one finishes,
instead of suspending an agent mid-task.
- Gives each agent an egress policy that lets TLS to
api.anthropic.com:443 pass through the gateway.
- The pod memory is 2560Mi (request = limit), not 2Gi. The worker keeps
part of it for itself, so a 2Gi agent didn't fit.
- Update the README to match the code.

agent-substrate#2488 by @Ziy1-Tan documents the same setup as manual steps. With this
PR those steps aren't needed.

Testing: tested on kind.

AI use: Claude assisted and I reviewed

- [x] Tests pass
- [x] Docs updated

Signed-off-by: Haven Xia <[email protected]>
Co-authored-by: Adam Wathieu <[email protected]>
(cherry picked from commit 43dc887)
Signed-off-by: Eitan Yarmush <[email protected]>
Yufan Su (yufan-su) pushed a commit to yufan-su/substrate that referenced this pull request Nov 3, 2026
The claude-code-multiplex demo doesn't work as written:

1. `deploy demo claude-code-multiplex` creates the three agent templates
but no actors, so the dashboard has no agents and "Give a task" fails
with `no agents available in namespace`.
2. Even with actors created by hand, the agents can't reach the
Anthropic API. Every actor starts with **no egress policy**, and the
egress gateway blocks all traffic.
3. The WorkerPool sets no resource limits, so each pod advertises the
whole node and all three agents run at once. The demo is about a third
agent waiting for a free pod, and that never happens.

How this PR fixes it:

- It builds on Adam's change from agent-substrate#2982 is folded in, with him as
co-author. Deploy creates the three actors, the dashboard resumes an
agent when its task starts and suspends it when the task ends, and each
pod is sized for one agent.
- When both pods are busy, a new task stays queued until one finishes,
instead of suspending an agent mid-task.
- Gives each agent an egress policy that lets TLS to
api.anthropic.com:443 pass through the gateway.
- The pod memory is 2560Mi (request = limit), not 2Gi. The worker keeps
part of it for itself, so a 2Gi agent didn't fit.
- Update the README to match the code.

agent-substrate#2488 by @Ziy1-Tan documents the same setup as manual steps. With this
PR those steps aren't needed.

Testing: tested on kind.

AI use: Claude assisted and I reviewed

- [x] Tests pass
- [x] Docs updated

Signed-off-by: Haven Xia <[email protected]>
Co-authored-by: Adam Wathieu <[email protected]>
Dmitry Berkovich (dberkov) pushed a commit that referenced this pull request Nov 3, 2026
The claude-code-multiplex demo doesn't work as written:

1. `deploy demo claude-code-multiplex` creates the three agent templates
but no actors, so the dashboard has no agents and "Give a task" fails
with `no agents available in namespace`.
2. Even with actors created by hand, the agents can't reach the
Anthropic API. Every actor starts with **no egress policy**, and the
egress gateway blocks all traffic.
3. The WorkerPool sets no resource limits, so each pod advertises the
whole node and all three agents run at once. The demo is about a third
agent waiting for a free pod, and that never happens.

How this PR fixes it:

- It builds on Adam's change from #2982 is folded in, with him as
co-author. Deploy creates the three actors, the dashboard resumes an
agent when its task starts and suspends it when the task ends, and each
pod is sized for one agent.
- When both pods are busy, a new task stays queued until one finishes,
instead of suspending an agent mid-task.
- Gives each agent an egress policy that lets TLS to
api.anthropic.com:443 pass through the gateway.
- The pod memory is 2560Mi (request = limit), not 2Gi. The worker keeps
part of it for itself, so a 2Gi agent didn't fit.
- Update the README to match the code.

#2488 by @Ziy1-Tan documents the same setup as manual steps. With this
PR those steps aren't needed.

Testing: tested on kind.

AI use: Claude assisted and I reviewed

- [x] Tests pass
- [x] Docs updated

Signed-off-by: Haven Xia <[email protected]>
Co-authored-by: Adam Wathieu <[email protected]>
(cherry picked from commit 43dc887)
Signed-off-by: Eitan Yarmush <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/demos kind/bug Something isn't working / bugfixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants