Expand description
System reminder infrastructure for agent guidance.
This module implements the <system-reminder> pattern used by Anthropic’s Claude SDK.
System reminders provide contextual hints to the AI agent without cluttering the main
conversation. Claude is trained to recognize these tags and follow the instructions
inside them without mentioning them to users.
§Example
use agent_sdk::reminders::{wrap_reminder, append_reminder, ReminderTracker};
use agent_sdk::ToolResult;
// Wrap content in system-reminder tags
let reminder = wrap_reminder("Consider verifying the output.");
assert!(reminder.contains("<system-reminder>"));
// Append a reminder to a tool result
let mut result = ToolResult::success("File written successfully.");
append_reminder(&mut result, "Consider reading the file to verify changes.");
assert!(result.output.contains("<system-reminder>"));Modules§
- builtin
- Built-in reminder content for primitive tools.
Structs§
- Reminder
Config - Configuration for the reminder system.
- Reminder
Tracker - Tracks tool usage for periodic reminder generation.
- Tool
Reminder - A custom reminder for a specific tool.
Enums§
- Reminder
Trigger - Determines when a tool reminder should be shown.
Functions§
- append_
reminder - Appends a system reminder to a tool result’s output.
- wrap_
reminder - Wraps content with system-reminder XML tags.