# `Pixir.Subagents.DelegationContext`
[🔗](https://github.com/Ranvier-Technologies/pixir/blob/main/lib/pixir/subagents/delegation_context.ex#L1)

Builds late-bound Delegation Context for Subagent child Turns.

Delegation Context is model-visible operational metadata for one child Turn. It
stays out of Pixir's stable prompt prefix: callers pass the returned map to
`Pixir.Turn.run/3`, which renders it into the late developer-context input
item. The map is string-keyed so it can be tested, logged later if a future ADR
accepts a durable event, and rendered deterministically without leaking Elixir
struct details.

# `from_agent`

```elixir
@spec from_agent(map()) :: map()
```

Build a compact string-keyed context map from a live Subagent record.

# `merge_metadata`

```elixir
@spec merge_metadata(map(), term()) :: map()
```

Merge Workflow or caller metadata into a base Delegation Context map.

---

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