Skip to content

Proactive Agent

The proactive agent system lets OpenMotoko take initiative instead of only responding to messages. It combines a task scheduler, an approval workflow, and an auditable action log.

Pulse is the proactive task engine. It runs background tasks on schedules you define.

{
"pulse": {
"enabled": true,
"budget": {
"daily": 200000,
"model": "fast"
},
"activeHours": {
"start": "08:00",
"end": "22:00",
"timezone": "Europe/Berlin"
},
"tasks": [
{
"id": "morning-briefing",
"trigger": { "type": "cron", "schedule": "0 8 * * *" },
"prompt": "Summarize my unread emails and calendar for today",
"priority": "high",
"model": "balanced"
},
{
"id": "repo-check",
"trigger": { "type": "interval", "every": "2h" },
"condition": "only during weekdays",
"prompt": "Check my GitHub repos for new issues",
"priority": "medium",
"model": "fast"
}
]
}
}
TypeFieldExample
cronschedule0 8 * * * (daily at 8am)
intervalevery30m, 2h, 1d
eventeventSystem event name

Pulse tracks daily token usage and resets at midnight:

FieldDefaultDescription
daily200000Max tokens per day
modelfastDefault model for pulse tasks

Critical-priority tasks can exceed the daily budget. All other tasks are skipped once the budget is exhausted.

Tasks only run within the configured time window. The timezone setting ensures correct behavior regardless of server location.

ResultMeaning
okTask ran, no action needed
action-takenTask produced an action (sent message, created artifact)
errorTask failed
skippedBudget exhausted or outside active hours

When the agent wants to take a significant action, it creates an intent that may require approval.

  1. Agent determines an action is needed
  2. An intent is created with a human-readable summary
  3. If approval is required (based on autonomy level), the intent is sent to the user
  4. User can approve, edit, or reject
  5. Approved intents are executed; rejected intents are logged and discarded
EventDescription
intent:createdNew intent pending approval
intent:resolvedIntent was approved, edited, or rejected

The autonomy dial controls how much independence the agent has. Four trust levels:

LevelNameBehavior
0Always askEvery action requires approval
1Ask for writesRead-only actions are auto-approved; writes need approval
2Rule-basedPattern-matching rules determine what needs approval
3Full autonomyOnly irreversible actions need approval

After 10 consecutive approvals at a given level, the system suggests promoting to the next level. This builds trust incrementally.

At level 2, you can define rules with wildcard matching:

{
"pattern": "filesystem:write:~/Documents/*",
"action": "allow"
}

Rules are stored in the autonomy_rules database table.

Every action the agent takes is recorded in a tamper-evident log.

Each log entry is signed with an HMAC using OPENMOTOKO_HMAC_SECRET. This allows verification that no entries have been modified or deleted after the fact.

Actions that support undo (file writes, message sends) include rollback metadata. The user can undo recent actions from the activity feed.

MethodPathDescription
GET/api/activityList activity with filters

Query parameters: limit, offset, channel, skillId, type.