-
Notifications
You must be signed in to change notification settings - Fork 96
feat(reminders): add reminder system to perform long-term goals in the background #176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
…tions Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Adds a reminder framework so the agent can schedule, list, and remove recurring or one-time jobs that run in the background, then report results back to the user.
- Introduces new actions (set, list, remove reminders) and ties them into the action registry
- Extends
AgentSharedState
with a reminder store and updatesperiodicallyRun
to trigger and summarize reminders - Implements core reminder logic and CLI for actions in
core/action/reminder.go
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
services/actions.go | Registered new reminder actions in constants and builder |
go.mod | Added cron/v3 dependency for scheduling |
core/types/state.go | Defined ReminderActionResponse and added reminders to state |
core/agent/templates.go | Added reminderTemplate for reminder processing |
core/agent/agent.go | Implemented periodic reminder checks and summaries |
core/action/reminder.go | Created set , list , and remove reminder actions |
Comments suppressed due to low confidence (2)
core/action/reminder.go:1
- New reminder actions have no accompanying unit tests; consider adding tests for setting, listing, and removing reminders to validate cron parsing, state updates, and error cases.
package action
core/agent/agent.go:1028
- [nitpick] There are large blocks of commented‐out code in
periodicallyRun
; consider removing or moving these to a design doc to keep the implementation focused and readable.
// TODO: Would be nice if we have a special action to
services/actions.go
Outdated
// Add the reminder action | ||
allActions = append(allActions, action.NewReminder()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You register only the "set_reminder" action here but not the list or remove actions; append action.NewListReminders()
and action.NewRemoveReminder()
as well so those tools are available during planning.
// Add the reminder action | |
allActions = append(allActions, action.NewReminder()) | |
// Add the reminder actions | |
allActions = append(allActions, action.NewReminder()) | |
allActions = append(allActions, action.NewListReminders()) | |
allActions = append(allActions, action.NewRemoveReminder()) |
Copilot uses AI. Check for mistakes.
core/agent/templates.go
Outdated
2. A follow-up action that you decided to do later | ||
3. A recurring task that needs periodic attention | ||
|
||
Current Reminder: {{.Message}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The template references {{.Message}}
but renderTemplate
doesn't supply a Message
field in its execution context—either include Message
or use an existing field like Reasoning
.
Copilot uses AI. Check for mistakes.
) | ||
|
||
require github.com/JohannesKaufmann/dom v0.2.0 // indirect | ||
require ( | ||
github.com/JohannesKaufmann/dom v0.2.0 // indirect | ||
github.com/robfig/cron/v3 v3.0.1 // indirect | ||
) | ||
|
||
require ( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] You have multiple require
blocks—consider consolidating them into one to improve readability of module dependencies.
Copilot uses AI. Check for mistakes.
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
Signed-off-by: Ettore Di Giacinto <mudler@localai.io>
This is an attempt to cover #128 and #72 . The idea is to have a set of actions to manage reminders (add, list and remove), and if the agent is enabled to perform background tasks, it will check the reminders periodically and fire new jobs.
Results are then returned to the user as new conversations with a summary of what was done.