Class ArtifactSinkingTool

  • All Implemented Interfaces:
    com.embabel.agent.api.tool.DelegatingTool , com.embabel.agent.api.tool.Tool , com.embabel.agent.api.tool.ToolInfo

    
    public final class ArtifactSinkingTool<T extends Object>
     implements DelegatingTool
                        

    Tool decorator that captures artifacts from tool results, filters and transforms them, then sends to one or more sinks.

    Handles both single artifacts and Iterables of artifacts.

    • Constructor Detail

      • ArtifactSinkingTool

        ArtifactSinkingTool(Tool delegate, Class<T> clazz, ArtifactSink sink, Function1<T, Boolean> filter, Function1<T, Object> transform)
        Parameters:
        delegate - The tool to wrap
        clazz - The class of T for type filtering
        sink - Where to send captured artifacts
        filter - Optional filter to decide which artifacts to capture.
        transform - Optional function to transform artifacts before sending to sink.