Class WellTypedToolsExample

java.lang.Object
ai.acolite.agentsdk.examples.WellTypedToolsExample

public class WellTypedToolsExample extends Object
WellTypedToolsExample

Demonstrates the benefits of well-typed tools using Lombok + Jackson.

Benefits: - Full type safety for inputs and outputs - Jackson annotations auto-generate JSON schemas - Lombok eliminates boilerplate (getters, setters, constructors) - IDE autocomplete for all tool parameters - Compile-time checking of parameter types - Clear, self-documenting code

This pattern matches the OpenAI SDK style while maintaining flexibility.

Usage: OPENAI_API_KEY=sk-... java com.openai.agents.examples.WellTypedToolsExample

  • Constructor Details

    • WellTypedToolsExample

      public WellTypedToolsExample()
  • Method Details

    • main

      public static void main(String[] args)