# `Raxol.Core.Runtime.Directive.Spawn`
[🔗](https://github.com/DROOdotFOO/raxol/blob/v2.8.0/lib/raxol/core/runtime/directive.ex#L67)

Spawn a Task that invokes `fun/0` and sends its return value back as
`{:command_result, result}`. Use `Raxol.Agent.Directive.async/1`
(from raxol_agent) when the task needs to send multiple messages.

# `t`

```elixir
@type t() :: %Raxol.Core.Runtime.Directive.Spawn{fun: (-&gt; any())}
```

---

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