Skip to content

emit_event

emit_event is a built-in tool available to every Selu agent. It lets an agent send a proactive notification to the user — even when there’s no active conversation. This powers use cases like reminders, alerts, scheduled updates, and background monitoring.

When the LLM calls emit_event, the orchestrator:

  1. Creates a notification payload.
  2. Delivers it through all channels the user has connected (web chat, iMessage, Telegram).
  3. Optionally starts a new session if the user replies to the notification.

The user sees the event as a message from the agent — no special UI is needed on the channel side.

name: emit_event
parameters:
- name: title
type: string
required: true
description: Short headline for the notification (max 100 chars).
- name: body
type: string
required: true
description: The notification message. Markdown is supported.
- name: priority
type: string
required: false
default: normal
description: "normal or urgent. Urgent events may trigger push notifications."
- name: schedule
type: string
required: false
description: "ISO 8601 datetime for delayed delivery. Omit for immediate."

You can instruct the agent to emit events in the system prompt:

agent.md
## Reminders
When the user asks you to remind them about something:
1. Confirm the reminder details.
2. Use `emit_event` with a `schedule` parameter set to the requested time.
3. Set `title` to a short summary and `body` to the full reminder text.

When the LLM decides to emit an event, it produces a tool call like:

{
"tool": "emit_event",
"parameters": {
"title": "Standup in 10 minutes",
"body": "Your daily standup meeting starts at 9:30 AM.",
"priority": "normal",
"schedule": "2025-07-15T09:20:00Z"
}
}

The orchestrator acknowledges the event and returns a confirmation:

{
"event_id": "evt_a1b2c3",
"status": "scheduled",
"deliver_at": "2025-07-15T09:20:00Z"
}

Users can subscribe to recurring events from agents that support them. For example, a news agent might emit a daily briefing. The subscription is configured in the user’s agent settings — no extra work required from the developer beyond supporting emit_event in the system prompt.

See Subscriptions & Events in the User Guide for the end-user perspective.

LimitValue
Max events per agent per hour60
Max body length4,000 characters
Max scheduled delay30 days
Max pending events per user500