instance

fun <T : Any> instance(agent: Agent, type: Class<T>): T

Run the agent instance as a subagent and return the result.

Parameters

agent

The agent instance to run as a subagent.

type

The expected return type.


inline fun <T : Any> instance(instance: Agent): T