# `Jidoka.Operation.Source.Subagent`
[🔗](https://github.com/agentjido/jidoka/blob/v0.9.0/lib/jidoka/operation/source/subagent.ex#L1)

Operation source for bounded subagent delegation.

A subagent call runs one child agent turn and returns the child result to the
parent. It does not change conversation ownership; handoffs own that separate
routing concern.

# `forward_context`

```elixir
@type forward_context() ::
  :public
  | :none
  | {:only, [atom() | String.t()]}
  | {:except, [atom() | String.t()]}
```

# `result_mode`

```elixir
@type result_mode() :: :text | :structured
```

# `t`

```elixir
@type t() :: %Jidoka.Operation.Source.Subagent{
  agent: module(),
  description: nil | binary(),
  forward_context: forward_context(),
  metadata: map(),
  name: binary(),
  result: :text | :structured,
  timeout: pos_integer()
}
```

# `new`

```elixir
@spec new(keyword() | map()) :: {:ok, t()} | {:error, term()}
```

Builds a bounded subagent operation source.

# `new!`

```elixir
@spec new!(keyword() | map()) :: t()
```

Builds a subagent source and raises if the settings are invalid.

---

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