withToolChainingFrom

open override fun <T : Any> withToolChainingFrom(type: Class<T>, predicate: DomainToolPredicate<T>): SimpleAgenticTool

Register a domain class with a predicate to control when its @LlmTool methods become available as tools.

When a single artifact of the specified type is returned, any @LlmTool annotated methods on that instance become available as tools, provided the predicate is satisfied.

When multiple artifacts of the same type are returned, "last wins" - only the most recent artifact that passes the predicate will have its tools exposed.

Parameters

type

The domain class that may contribute @LlmTool methods

predicate

Predicate to filter which instances contribute tools


inline fun <T : Any> withToolChainingFrom(noinline predicate: (T, AgentProcess?) -> Boolean): SimpleAgenticTool

Register a domain class with a predicate. Kotlin-friendly version using reified type parameter.


Register a class that can contribute @LlmTool methods when a single instance is retrieved. Kotlin-friendly version using reified type parameter.