sipeed/picoclaw · error

mqtt agent_id is required

Error message

mqtt agent_id is required

What it means

Error "mqtt agent_id is required" thrown in sipeed/picoclaw.

Source

Thrown at pkg/channels/mqtt/mqtt.go:43

}

// MQTTChannel implements the Channel interface for MQTT-based communication.
type MQTTChannel struct {
	*channels.BaseChannel
	bc       *config.Channel
	cfg      *config.MQTTSettings
	client   pahomqtt.Client
	qos      byte
	clientID string
}

// NewMQTTChannel creates a new MQTT channel instance.
func NewMQTTChannel(bc *config.Channel, cfg *config.MQTTSettings, b *bus.MessageBus) (*MQTTChannel, error) {
	if cfg.Broker == "" {
		return nil, fmt.Errorf("mqtt broker is required")
	}
	if cfg.AgentID == "" {
		return nil, fmt.Errorf("mqtt agent_id is required")
	}

	base := channels.NewBaseChannel("mqtt", cfg, b, bc.AllowFrom,
		channels.WithGroupTrigger(bc.GroupTrigger),
		channels.WithReasoningChannelID(bc.ReasoningChannelID),
	)

	mqttClientID := cfg.ClientID
	if mqttClientID == "" {
		var suffix [4]byte
		_, _ = rand.Read(suffix[:])
		mqttClientID = fmt.Sprintf("picoclaw-mqtt-%s-%s", cfg.AgentID, hex.EncodeToString(suffix[:]))
	}

	return &MQTTChannel{
		BaseChannel: base,
		bc:          bc,
		cfg:         cfg,

View on GitHub (pinned to 49183d7e8d)

When it happens

Trigger: Thrown at pkg/channels/mqtt/mqtt.go:43 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of sipeed/picoclaw@49183d7e8d (2026-08-15). Data as JSON: /api/errors/60aac5b02c1e073d. Report an issue: GitHub.