0eb9e8741d
Nuevo agente Matrix especializado en consultas meteorológicas. Usa la API pública Open-Meteo (sin API key) para obtener condiciones actuales y previsión de 3 días para cualquier ciudad. Incluye: - agents/meteorologo/ — reglas puras, config.yaml, system prompt - tools/weather.go — tool get_weather (geocoding + forecast) - Registro en runtime.go (tool registry) y launcher (rulesRegistry) El agente responde a DMs y menciones delegando al LLM con tool_use habilitado. No tiene comandos directos (!xxx). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
25 lines
634 B
Go
25 lines
634 B
Go
// Package meteorologo defines the pure rules for the meteorologo bot.
|
|
// This agent uses tool_use (get_weather) to provide weather information.
|
|
package meteorologo
|
|
|
|
import (
|
|
"github.com/enmanuel/agents/pkg/decision"
|
|
)
|
|
|
|
// Rules returns the decision rules for the meteorologo bot.
|
|
func Rules() []decision.Rule {
|
|
return []decision.Rule{
|
|
// Any DM or mention → LLM (with tool-use enabled)
|
|
{
|
|
Name: "llm-all",
|
|
Match: func(ctx decision.MessageContext) bool {
|
|
return ctx.IsDirectMsg || ctx.IsMention
|
|
},
|
|
Actions: []decision.Action{{
|
|
Kind: decision.ActionKindLLM,
|
|
LLM: &decision.LLMAction{},
|
|
}},
|
|
},
|
|
}
|
|
}
|