# `Wardrik.Operations.Agents`

Operations over the agents that resource patterns cover: listing them and their events.

# `cancel`

```elixir
@spec cancel(Wardrik.Scope.t(), map()) :: {:ok, map()}
```

Cancels what each agent is doing. Returns those that were cancelled.

# `events`

```elixir
@spec events(Wardrik.Scope.t(), map()) :: {:ok, map()} | {:error, Wardrik.Error.t()}
```

Returns a page of the agents' events.

# `forget`

```elixir
@spec forget(Wardrik.Scope.t(), map()) :: {:ok, map()}
```

Forgets each agent. Returns those forgotten, those kept because they're declared, and those
that failed, with why.

# `head`

```elixir
@spec head(Wardrik.Scope.t(), map()) :: {:ok, map()}
```

Returns the cursor at the end of the agents' logs.

# `interrupts`

```elixir
@spec interrupts(Wardrik.Scope.t(), map()) :: {:ok, map()}
```

Lists the calls the agents wait on a person for.

# `list`

```elixir
@spec list(Wardrik.Scope.t(), map()) :: {:ok, map()}
```

Lists the agents.

# `stream`

```elixir
@spec stream(Wardrik.Scope.t(), map()) ::
  {:ok, Enumerable.t()} | {:error, Wardrik.Error.t()}
```

Streams the agents' events as `{event, cursor}`. Reads what's there, then follows new events.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
