Jido.Agent.Directive.Spawn (Jido v2.0.0-rc.0)
View SourceSpawn a generic BEAM child process under the agent's supervisor.
This is a low-level, fire-and-forget directive for spawning non-agent processes (Tasks, GenServers, etc.). The spawned process is not tracked in the agent's children map and has no parent-child relationship semantics.
Use SpawnAgent instead if you need to spawn another Jido agent with:
- Parent-child hierarchy tracking
- Process monitoring and exit signals
- The ability to use
emit_to_parent/3from the child - Lifecycle management via
StopChild
Fields
child_spec- Supervisor child_spec for the process to spawntag- Optional correlation tag for logging (not used for tracking)
Summary
Types
Functions
@spec schema() :: Zoi.schema()
Returns the Zoi schema for Spawn.