# Event streams

URL: /code/platform/event-streams · Id: `capability:event-streams`

> Event streams record every completed Action as an immutable Event and deliver it, in order, to subscribers, Watches and replays.

Event streams record every completed [Action](/business/nouns/action) as an immutable [Event](/business/nouns/event) and deliver it, in order, to [Triggers](/business/nouns/trigger), [Watches](/business/nouns/watch), live readers and replays.

## Contract
- Every change of an Action's status appends one Event, named in the past tense: `Order.refunded`, `Lesson.booked`.
- Events are ordered per namespace by sequence number and kept forever.
- One selector grammar matches Events everywhere: Triggers, Watches, [Meters](/business/nouns/meter), [Task](/business/nouns/task) completion rules and control tests.
- A Trigger wakes a [Workflow](/business/nouns/workflow) on a match. A Watch delivers each match to a URL, signed, retried and replayable from any point.
- Only declared Event names feed [Metrics](/business/nouns/metric). Undeclared names stay raw telemetry.
- Telemetry may be sampled. A billed Event never is.
- Outside events enter through one verified [webhook door](/code/api/guides/webhooks) and are written as Events before any Workflow acts on them.

## Verbs
| Verb | Object | Event |
| --- | --- | --- |
| [Event.list](/business/nouns/event/list) | [Event](/business/nouns/event) | None. |
| [Watch.create](/business/nouns/watch/create) | [Watch](/business/nouns/watch) | `Watch.created` |
| [Watch.replay](/business/nouns/watch/replay) | [Watch](/business/nouns/watch) | [`Watch.replayed`](/business/events/Watch.replayed) |

## Interfaces
- [API](/code/api/reference)
- [SDK](/code/sdk/reference)
- [CLI](/code/cli/reference)
- [MCP](/code/mcp/reference)
- Webhooks

## Example
```ts
import { $ } from 'startup-builder'

// A course platform sends completions to a partner's learning system, then replays a missed week.
const { watch, secret } = await $.Watch.create({
  selector: 'Enrollment.completed where course = course_sql',
  url: 'https://lms.partner.example/hooks/completions',
})
// The secret is shown once: hand it to the receiver now.
await $.Watch.replay({ watch: watch.$id, from: '2026-10-01' })
```