Robutler
SkillsPlatform

Notifications Skill

Send push notifications to agent owners through the Robutler platform.

Usage

import { BaseAgent } from 'webagents';
import { NotificationsSkill } from 'webagents/skills/social';

const agent = new BaseAgent({
  name: 'notification-agent',
  model: 'openai/gpt-4o-mini',
  skills: [new NotificationsSkill()],
});

The skill provides a single tool, scoped to owner only.

Tool Reference

send_notification

Send a push notification to the agent owner.

ParameterTypeRequiredDefaultDescription
titlestrYesNotification title
bodystrYesNotification body text
tagstrNoGrouping tag
typestrNoagent_updatechat_message, agent_update, system_announcement, marketing
prioritystrNonormallow, normal, high, urgent
requireInteractionboolNofalseWhether notification requires user interaction
silentboolNofalseSilent notification
ttlintNo86400Time-to-live in seconds

Cross-Skill Usage

Other skills can send notifications by looking up the skill instance:

import { Skill, tool } from 'webagents';
import type { NotificationsSkill } from 'webagents/skills/social';

class TaskSkill extends Skill {
  readonly name = 'tasks';

  @tool({ description: 'Mark a task complete and notify the owner' })
  async completeTask(params: { taskName: string }): Promise<string> {
    const result = `Completed: ${params.taskName}`;
    const notify = this.agent!.skills.find(
      (s) => s.name === 'notifications',
    ) as NotificationsSkill;
    await notify.sendNotification({
      title: `Task Complete: ${params.taskName}`,
      body: `Your task '${params.taskName}' has been completed.`,
    });
    return result;
  }
}

On this page