createSubAgent(spec: SubAgent, options: __type): ReactAgentCreate a runnable agent from a declarative SubAgent spec.
This is the shared entrypoint for compiling a SubAgent into a
ReactAgent. Pre-compiled CompiledSubAgent runnables bypass this
function entirely.
The spec must have model and tools set — the caller is responsible
for coalescing any defaults before calling this function.