feat(reminders): add reminder system to perform long-term goals in the background (#176)

* feat(reminders): add self-ability to set reminders

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* feat(reminders): surface reminders result to the user as new conversations

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* Fixups

* Subscribe all connectors to agents new messages

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* Set reminders in the list

* fix(telegram): do not always auth

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

* Small fixups

* Improve UX

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>

---------

Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This commit is contained in:
Ettore Di Giacinto
2025-05-24 22:15:33 +02:00
committed by GitHub
parent 490bf998a4
commit 9a90153dc6
12 changed files with 440 additions and 46 deletions

View File

@@ -47,6 +47,9 @@ const (
ActionCallAgents = "call_agents"
ActionShellcommand = "shell-command"
ActionSendTelegramMessage = "send-telegram-message"
ActionSetReminder = "set_reminder"
ActionListReminders = "list_reminders"
ActionRemoveReminder = "remove_reminder"
)
var AvailableActions = []string{
@@ -81,6 +84,9 @@ var AvailableActions = []string{
ActionCallAgents,
ActionShellcommand,
ActionSendTelegramMessage,
ActionSetReminder,
ActionListReminders,
ActionRemoveReminder,
}
const (
@@ -187,6 +193,12 @@ func Action(name, agentName string, config map[string]string, pool *state.AgentP
a = actions.NewShell(config, actionsConfigs[ActionConfigSSHBoxURL])
case ActionSendTelegramMessage:
a = actions.NewSendTelegramMessageRunner(config)
case ActionSetReminder:
a = action.NewReminder()
case ActionListReminders:
a = action.NewListReminders()
case ActionRemoveReminder:
a = action.NewRemoveReminder()
default:
xlog.Error("Action not found", "name", name)
return nil, fmt.Errorf("Action not found")
@@ -356,5 +368,20 @@ func ActionsConfigMeta() []config.FieldGroup {
Label: "Send Telegram Message",
Fields: actions.SendTelegramMessageConfigMeta(),
},
{
Name: "set_reminder",
Label: "Set Reminder",
Fields: []config.Field{},
},
{
Name: "list_reminders",
Label: "List Reminders",
Fields: []config.Field{},
},
{
Name: "remove_reminder",
Label: "Remove Reminder",
Fields: []config.Field{},
},
}
}