Skip to content

[Substrate] Registry → Substrate render (SandboxAgent + ActorTemplate; resolve promptRef) #73

Description

@Sam123ben

Part of the Agent Substrate epic ⬆️. Depends on #B (Substrate CRDs) + #C (authored agents).

Goal

Turn a published DevAI registry agent into the Substrate runtime objects automatically, the same way kagent-agent-sync already renders the classic Agent CR today.

Today (grounded)

agentic-registry serves GET /v0/export/kagent → renders kagent Agent (v1alpha2, spec.declarative) + ToolServer. kagent-agent-sync (CronJob) curls it and kubectl applys with --prune. We added per-variant rendering (provider/model) + the active-variants endpoint + lane-aware reconcile this session. Known gap: the export does NOT resolve promptRef → empty systemMessage → invalid CR (we built but reverted that one-line fix).

Tasks

  • Teach the export to emit SandboxAgent (+ ActorTemplate / AgentHarnessSubstrateSpec) when the agent targets Substrate, vs the classic Agent otherwise.
  • Resolve promptRefPrompt.spec.systemPrompt at export so the 39 prompt-by-reference agents render a valid non-empty systemMessage (the reverted kagent.go Options.SystemPrompt + resolveSystemPrompt change — redo it).
  • Map DevAI agent fields → SandboxAgent: runtime (Go/Python/ADK), model/provider, tools/MCP (RemoteMCPServer + toolNames — the v1alpha2 tool path still needs porting), WorkerPool ref, sandbox runtime.
  • Reconcile in kagent-agent-sync: render → apply/prune SandboxAgents; keep the reap-on-empty + operator kill-switch semantics we shipped.
  • Note the registry label-merge gotcha (apply merges metadata.labels; unlabelling a seed doesn't drop it) — the reliable off-switch is the active-variants kill-switch.

Acceptance

Publishing/labelling an agent for Substrate produces a valid SandboxAgent the controller accepts; unlabelling/kill-switch reaps it. No empty-systemMessage rejections.

Refs: agentic-registry/{adapters/kagent,internal/api/export.go,internal/api/resolve.go}, tesserix-k8s/charts/apps/kagent-agent-sync/; memory: Agent Harness + kagent (promptRef + reap gotchas).

— Part of #69

Metadata

Metadata

Assignees

Labels

agent-substratekagent Agent Substrate adoptionenhancementNew feature or requestkagentkagent / agent runtime

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions