ConnectOnionConnectOnion
DocsUseful Pluginssystem_reminder

system_reminder

Inject contextual guidance into tool results

What it does

The system_reminder plugin injects contextual guidance into tool results to nudge agent behavior—without extra API calls.

Example: After writing code

code
1write_file("app.py", code) 23Result: "File written successfully" 45With system reminder: "File written successfully 6 7 <system-reminder> 8 Consider running tests to verify your changes. 9 This is a gentle reminder - ignore if not applicable. 10 </system-reminder>"

Quick Start

main.py
1from connectonion import Agent 2from connectonion.useful_plugins import system_reminder 3 4agent = Agent("assistant", tools=[write_file], plugins=[system_reminder])

Want to customize? Run co copy system_reminder to get an editable copy with built-in reminders.

How it works

┌─────────────────────────────────────────────┐
│          SYSTEM REMINDER FLOW                │
├─────────────────────────────────────────────┤
│                                             │
│  1. Tool executes (e.g., write_file)        │
│                 ↓                           │
│  2. after_each_tool event fires             │
│                 ↓                           │
│  3. Plugin checks triggers:                 │
│     - tool name matches?                    │
│     - path pattern matches?                 │
│                 ↓                           │
│  4. If match: append system reminder        │
│                 ↓                           │
│  5. LLM sees result + system reminder       │
│                                             │
└─────────────────────────────────────────────┘

Reminder Categories

Based on Claude Code patterns, system reminders fall into five categories:

CategoryPurposeExample
Workflow NudgesGentle best practice suggestions"Consider running tests"
State NotificationsInform about state changes"You exited plan mode"
External EventsReact to external changes"File was modified by linter"
Next StepsGuide what to do next"Verify your implementation"
Context InjectionProvide relevant info"This file contains secrets"

Reminder File Format

Each system reminder is a markdown file with YAML frontmatter:

code
1--- 2name: test-reminder 3triggers: 4 - tool: write_file 5 path_pattern: "*.py" 6--- 7 8<system-reminder> 9Consider running tests to verify your changes. 10This is a gentle reminder - ignore if not applicable. 11</system-reminder>

Frontmatter Fields

FieldRequiredDescription
nameYesUnique identifier
triggersYesList of trigger conditions
triggers[].toolNoTool name to match
triggers[].path_patternNoGlob pattern(s) for file paths
triggers[].command_patternNoGlob pattern(s) for commands

Customizing

Copy the plugin and built-in reminders to your project:

code
1co copy system_reminder
Python REPL
Interactive
✓ Copied: ./plugins/system_reminder.py
✓ Copied: ./prompts/system-reminders/

This creates:

code
1./plugins/system_reminder.py 2./prompts/system-reminders/ 3├── test-reminder.md 4└── security-warning.md

Then import from your local copy and add new reminders:

main.py
1from plugins.system_reminder import system_reminder 2agent = Agent("assistant", plugins=[system_reminder])

Design Principles

Gentle, Not Forceful

  • ✓ "Consider running tests"
  • ✗ "You MUST run tests now"

Contextual, Not Spammy

Fire only when relevant, not after every tool call

Events Used

EventHandlerPurpose
after_each_toolinject_reminderAppend matching reminder to tool result

Source

connectonion/useful_plugins/system_reminder.py

main.py
1# The plugin is just a list of event handlers 2system_reminder = [inject_reminder]