getFeature

fun <T : Any> AIAgent<*, *>.getFeature(featureClass: KClass<T>, feature: AIAgentGraphFeature<*, T>): T?

Retrieves an installed feature instance from the agent's pipeline.

Shorthand for the agent.createSession().pipeline()?.feature(...) ceremony. createSession() is lightweight — it wraps the agent's existing pipeline without creating a new one, so calling this repeatedly is safe.

Return

The feature instance, or null if not installed.

Parameters

featureClass

The KClass of the feature implementation type.

feature

The feature object (singleton) to look up.