microsoft/semantic-kernel · error · ArgumentException
No topic names registered
Error message
No topic names registered
What it means
Thrown by the ProcessProxyBuilder constructor when the externalTopics list is empty. A proxy step exists solely to publish events to external topics, so at least one topic name must be provided at construction time.
Source
Thrown at dotnet/src/Experimental/Process.Core/ProcessProxyBuilder.cs:25
using Microsoft.SemanticKernel.Process.Models;
namespace Microsoft.SemanticKernel;
/// <summary>
/// Provides functionality to allow emitting external messages from within the SK
/// process.
/// </summary>
public sealed class ProcessProxyBuilder : ProcessStepBuilder<KernelProxyStep>
{
/// <summary>
/// Initializes a new instance of the <see cref="ProcessProxyBuilder"/> class.
/// </summary>
internal ProcessProxyBuilder(IReadOnlyList<string> externalTopics, string name, ProcessBuilder? processBuilder)
: base(name, processBuilder)
{
if (externalTopics.Count == 0)
{
throw new ArgumentException("No topic names registered");
}
this._externalTopicUsage = externalTopics.ToDictionary(topic => topic, topic => false);
if (this._externalTopicUsage.Count < externalTopics.Count)
{
throw new ArgumentException("Topic names registered must be different");
}
}
/// <summary>
/// Version of the proxy step, used when saving the state of the step.
/// </summary>
public string Version { get; init; } = "v1";
internal readonly Dictionary<string, bool> _externalTopicUsage;
// For supporting multiple step edges getting linked to the same external topic, current implementation needs to be updated
// to instead have a list of potential edges in case event names in different steps have same nameView on GitHub (pinned to c028a0c7dc)
Solutions
- Provide at least one topic name when constructing the proxy step or calling AddProxyStep.
- If topics come from configuration, validate the configuration source returns at least one topic before calling AddProxyStep.
- Consider whether a proxy step is needed at all if there are no external topics — proxy steps without topics serve no purpose.
Example fix
// before
process.AddProxyStep("myProxy", externalTopics: new List<string>());
// after
process.AddProxyStep("myProxy", externalTopics: new List<string> { "topic1", "topic2" }); Defensive patterns
Strategy: validation
Validate before calling
if (externalTopics is null || externalTopics.Count == 0)
throw new ArgumentException("At least one external topic is required for a proxy step.", nameof(externalTopics));
process.AddProxyStep("myProxy", externalTopics); Prevention
- Validate the topics list is non-empty before calling AddProxyStep.
- If topics come from configuration, validate the config source returns at least one value.
- Question whether a proxy step is needed if there are no topics to publish to.
When it happens
Trigger: Calling new ProcessProxyBuilder(externalTopics: new List<string>(), ...) directly, or calling process.AddProxyStep(id, externalTopics: []) with an empty topic list.
Common situations: Building a proxy step dynamically from configuration where the topics list was not populated; passing a default/empty list because the topics come from a source that returned no values; copy-pasting a proxy setup and forgetting to fill in topics.
Related errors
- Topic names registered must be different
- Topic name {topicName} is not registered as proxy publish ev
- Entry agent is not defined.
- Invalid AgentId key: '{key}'. Must only contain ASCII charac
- Invalid AgentId type: '{type}'. Must be alphanumeric (a-z, 0
AI-assisted analysis of microsoft/semantic-kernel@c028a0c7dc (2026-08-13).
Data as JSON: /api/errors/15551d0822953e95.
Report an issue: GitHub.